aboutsummaryrefslogtreecommitdiff
path: root/net/cdp.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-11-05 12:48:19 +0100
committerJoe Hershberger <joe.hershberger@ni.com>2019-12-09 09:47:42 -0600
commit8524423da9afc637167057dd69e1f52f6dbcc8e5 (patch)
treef51a0ecfc471507cac1c436933d10d80b06dcf18 /net/cdp.c
parent1f60789602e0d5f5f9a8b507f25737c65b5d8daa (diff)
downloadu-boot-8524423da9afc637167057dd69e1f52f6dbcc8e5.zip
u-boot-8524423da9afc637167057dd69e1f52f6dbcc8e5.tar.gz
u-boot-8524423da9afc637167057dd69e1f52f6dbcc8e5.tar.bz2
net: avoid address-of-packed-member error
sandbox_defconfig does not compile using GCC 9.2.1: 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); | ^~~~~~~~~~~~~~ Avoid the error by using a u8 pointer instead of an u16 pointer and in-lining ntohs(). Simplify the checksumming of the last message byte. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net/cdp.c')
0 files changed, 0 insertions, 0 deletions