mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-20 22:23:16 +00:00
52e8c95321
With the update to GCC 10 the compiler used to warn when using the internet checksum functions on packet classes (like in Net::Ipv4_packet::update_checksum): warning: converting a packed ‘Net::[PACKET_CLASS]’ pointer (alignment 1) to a ‘const uint16_t’ {aka ‘const short unsigned int’} pointer (alignment 2) may result in an unaligned pointer value Apparently, the 'packed' attribute normally used on packet classes sets the alignment of the packet class to 1. However, for the purpose of the internet-checksum functions, we can assume that the packet data has no alignment. This is expressed by casting the packet-object pointer to a pointer of the new packed helper struct 'Packed_uint16' that contains only a single uint16_t member before handing it over to the checksum function (instead of casting it to a uint16_t pointer). Ref #4109 |
||
---|---|---|
.. | ||
doc | ||
include | ||
lib | ||
recipes | ||
run | ||
src | ||
xsd | ||
README |
This source-code repository contains genuine low-level OS components and interfaces of Genode. It solely depends on the framework's base API.