genode/repos/os
Martin Stein 52e8c95321 net: fix packed-conversion compiler warning
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
2021-05-05 11:35:31 +02:00
..
doc Remove <configfile> feature from init 2020-05-18 10:16:13 +02:00
include net: fix packed-conversion compiler warning 2021-05-05 11:35:31 +02:00
lib sandbox/init: parse config using 'List_model' 2021-04-20 12:03:04 +02:00
recipes platform driver: make device info XML optional 2021-05-05 11:31:16 +02:00
run event_filter: add new test cases 2021-05-05 11:35:29 +02:00
src net: fix packed-conversion compiler warning 2021-05-05 11:35:31 +02:00
xsd nic drivers: provide optional Uplink-client mode 2021-01-25 13:58:09 +01:00
README API documentation refinements 2017-05-31 13:16:21 +02:00

This source-code repository contains genuine low-level OS components and
interfaces of Genode. It solely depends on the framework's base API.