[U-Boot] [BUGS] fs/cbfs/cbfs.c and net/net.c do not compile with GCC 9.2.1

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Oct 3 14:30:23 UTC 2019


Compiling fs/cbfs/cbfs.c and net/net.c fails for sandbox_defconfig using
GCC 9.2.1 (Debian Bullseye):

CC      fs/cbfs/cbfs.o
fs/cbfs/cbfs.c: In function ‘file_cbfs_fill_cache’:
fs/cbfs/cbfs.c:164:16: error: taking address of packed member of ‘struct
cbfs_cachenode’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
   164 |   cache_tail = &new_node->next;
       |                ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:279: fs/cbfs/cbfs.o] Error 1
make[1]: *** [scripts/Makefile.build:432: fs/cbfs] Error 2
make: *** [Makefile:1629: fs] Error 2


net/net.c: In function ‘net_process_received_packet’:
net/net.c:1288:23: error: taking address of packed member of ‘struct
ip_udp_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  1288 |    sumptr = (ushort *)&(ip->udp_src);
       |                       ^~~~~~~~~~~~~~

Best regards

Heinrich


More information about the U-Boot mailing list