mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
gcc9: Move structure packing to the struct definition
Silences GCC9 warnings about possible casting misalignments. Change-Id: I2120638d4d143e9e539b7f240c31653ad55ae4e0
This commit is contained in:
parent
8b9ef7cf8d
commit
94d6265df0
3 changed files with 9 additions and 12 deletions
|
@ -101,7 +101,7 @@ struct ata_smart_values
|
||||||
unsigned char reserved_375_385[11];
|
unsigned char reserved_375_385[11];
|
||||||
unsigned char vendor_specific_386_510[125];
|
unsigned char vendor_specific_386_510[125];
|
||||||
unsigned char chksum;
|
unsigned char chksum;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed)) __attribute__((aligned(2)));
|
||||||
|
|
||||||
/* Raw attribute value print formats */
|
/* Raw attribute value print formats */
|
||||||
enum ata_attr_raw_format
|
enum ata_attr_raw_format
|
||||||
|
|
|
@ -292,7 +292,7 @@ struct usb_string_descriptor {
|
||||||
uint8_t bDescriptorType;
|
uint8_t bDescriptorType;
|
||||||
|
|
||||||
uint16_t wString[]; /* UTF-16LE encoded */
|
uint16_t wString[]; /* UTF-16LE encoded */
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed)) __attribute__((aligned(2)));
|
||||||
|
|
||||||
/* note that "string" zero is special, it holds language codes that
|
/* note that "string" zero is special, it holds language codes that
|
||||||
* the device supports, not Unicode characters.
|
* the device supports, not Unicode characters.
|
||||||
|
|
|
@ -119,16 +119,13 @@ static const struct usb_qualifier_descriptor __attribute__((aligned(2)))
|
||||||
.bNumConfigurations = 1
|
.bNumConfigurations = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct usb_string_descriptor __attribute__((aligned(2)))
|
static const struct usb_string_descriptor usb_string_iManufacturer =
|
||||||
usb_string_iManufacturer =
|
|
||||||
USB_STRING_INITIALIZER(u"Rockbox.org");
|
USB_STRING_INITIALIZER(u"Rockbox.org");
|
||||||
|
|
||||||
static const struct usb_string_descriptor __attribute__((aligned(2)))
|
static const struct usb_string_descriptor usb_string_iProduct =
|
||||||
usb_string_iProduct =
|
|
||||||
USB_STRING_INITIALIZER(u"Rockbox media player");
|
USB_STRING_INITIALIZER(u"Rockbox media player");
|
||||||
|
|
||||||
static struct usb_string_descriptor __attribute__((aligned(2)))
|
static struct usb_string_descriptor usb_string_iSerial =
|
||||||
usb_string_iSerial =
|
|
||||||
USB_STRING_INITIALIZER(u"00000000000000000000000000000000000000000");
|
USB_STRING_INITIALIZER(u"00000000000000000000000000000000000000000");
|
||||||
|
|
||||||
/* Generic for all targets */
|
/* Generic for all targets */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue