mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
spa: v4l2: Convert buf structure to union and fix alignment
The inotify_event field has a variable sized type, so it's recommended to store it at the end of the storage unit. Fixes gnu-variable-sized-type-not-at-end warning.
This commit is contained in:
parent
ec7ed1275e
commit
6b1c483cf7
1 changed files with 3 additions and 3 deletions
|
|
@ -411,9 +411,9 @@ static void impl_on_notify_events(struct spa_source *source)
|
||||||
{
|
{
|
||||||
bool deleted = false;
|
bool deleted = false;
|
||||||
struct impl *this = source->data;
|
struct impl *this = source->data;
|
||||||
struct {
|
union {
|
||||||
struct inotify_event e;
|
unsigned char name[sizeof(struct inotify_event) + NAME_MAX + 1];
|
||||||
char name[NAME_MAX+1];
|
struct inotify_event e; /* for appropriate alignment */
|
||||||
} buf;
|
} buf;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue