]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
UBUNTU: SAUCE: usbip: add -Wno-address-of-packed-member to EXTRA_CFLAGS
authorSeth Forshee <seth.forshee@canonical.com>
Mon, 8 Jul 2019 04:15:19 +0000 (23:15 -0500)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Feb 2021 07:25:45 +0000 (08:25 +0100)
Fails to build with gcc 9.1.0 due to
-Werror=address-of-packed-member. One example:

  usbip_network.c: In function 'usbip_net_pack_usb_device':
  usbip_network.c:79:32: error: taking address of packed member of 'struct usbip_usb_device' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     79 |  usbip_net_pack_uint32_t(pack, &udev->busnum);
        |                                ^~~~~~~~~~~~~

All of these are code which is explicitly packing a struct, so
add -Wno-address-of-packed-member to EXTRA_CFLAGS to disable this
warning.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
tools/usb/usbip/configure.ac

index 607d05c5ccfd3131ce96f23d107ee44f709f8bb2..09593bef4f95acbed775c939374fdaab38ba797f 100644 (file)
@@ -18,7 +18,7 @@ LT_INIT
 # Silent build for automake >= 1.11
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-AC_SUBST([EXTRA_CFLAGS], ["-Wall -Werror -Wextra -std=gnu99"])
+AC_SUBST([EXTRA_CFLAGS], ["-Wall -Werror -Wextra -Wno-address-of-packed-member -std=gnu99"])
 
 # Checks for programs.
 AC_PROG_CC