17 Jan
2024
17 Jan
'24
10:57 p.m.
Rémi Bernon (@rbernon) commented about dlls/dmime/audiopath.c:
BOOL fActive; };
+struct audio_path_pchannel_to_buffer +{ + struct list entry; + DMUS_IO_PCHANNELTOBUFFER_HEADER header; + + ULONG num_of_guids; + GUID guids[]; +}; +
For flexible array members and to avoid some possible undefined behavior due to struct alignment I usually also add something like that: ``` C_ASSERT(sizeof(struct pool) == offsetof(struct pool, cues[0])); ``` (And if it breaks because of alignment, layout the struct differently or add some explicit padding, but it's rarely needed). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4852#note_57825