1
0
Fork 0
forked from len0rd/rockbox

gcc9: Move structure packing to the struct definition

Silences GCC9 warnings about possible casting misalignments.

Change-Id: I2120638d4d143e9e539b7f240c31653ad55ae4e0
This commit is contained in:
Solomon Peachy 2024-10-12 09:19:11 -04:00
parent 8b9ef7cf8d
commit 94d6265df0
3 changed files with 9 additions and 12 deletions

View file

@ -292,7 +292,7 @@ struct usb_string_descriptor {
uint8_t bDescriptorType;
uint16_t wString[]; /* UTF-16LE encoded */
} __attribute__ ((packed));
} __attribute__ ((packed)) __attribute__((aligned(2)));
/* note that "string" zero is special, it holds language codes that
* the device supports, not Unicode characters.