mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
49184fb938
With the update to GCC 10, the compiler stopped with an error when compiling places where a MAC address is copied from outside into a packed object using the Net::Netaddress::copy method (e.g. in Net::Arp_packet::dst_mac(Mac_address)): ! error: writing 6 bytes into a region of size 4 [-Werror=stringop-overflow=] While trying to find a clean solution for this error, I found posts on gcc.gnu.org and github that stated that the size calculations that cause these errors are incorrect. Indeed, I could verify that the actual size of the two regions was static and exactly the same in places were the error occured. Furthermore, I couldn't find a way of making it more clear to the compiler that the sizes are the same. By accident, we found that using the address of the first element of the array that forms the second region instead of the array address itself, somehow circumvents the error. Fixes #4109 |
||
---|---|---|
.. | ||
arp.h | ||
dhcp.h | ||
ethernet.h | ||
icmp.h | ||
internet_checksum.h | ||
ipv4.h | ||
mac_address.h | ||
netaddress.h | ||
port.h | ||
size_guard.h | ||
sntp.h | ||
tcp.h | ||
udp.h |