Home
last modified time | relevance | path

Searched hist:"89 dc9c65f3775c8f8c00bab70a638ab4f5555413" (Results 1 – 1 of 1) sorted by relevance

/openbmc/u-boot/
H A DMakefile89dc9c65f3775c8f8c00bab70a638ab4f5555413 Tue Feb 25 00:35:53 CST 2020 Andy Shevchenko <andriy.shevchenko@linux.intel.com> gcc-9: silence 'address-of-packed-member' warning

GCC 9.x starts complaining about potential misalignment of the pointer to
the array (in this case alignment=2) in the packed (alignment=1) structures.

Repeating Linus' Torvalds commit 6f303d60534c in the Linux kernel.

Original commit message:

We already did this for clang, but now gcc has that warning too.
Yes, yes, the address may be unaligned. And that's kind of the point.

This in particular hides the warnings like

drivers/usb/gadget/composite.c:545:23: warning: taking address of packed member of ‘struct usb_string_descriptor’ may result in an unaligned pointer value [-Waddress-of-packed-member]
545 | collect_langs(sp, s->wData);

drivers/usb/gadget/composite.c:550:24: warning: taking address of packed member of ‘struct usb_string_descriptor’ may result in an unaligned pointer value [-Waddress-of-packed-member]
550 | collect_langs(sp, s->wData);

drivers/usb/gadget/composite.c:555:25: warning: taking address of packed member of ‘struct usb_string_descriptor’ may result in an unaligned pointer value [-Waddress-of-packed-member]
555 | collect_langs(sp, s->wData);

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(cherry picked from commit 53dc8ae66c5ca8dac65bd6f51c0cbb8b0d22aa2a)
Signed-off-by: Joel Stanley <joel@jms.id.au>