Attention is currently required from: arehbein, daniel, dexter, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email )
Change subject: ipa: Don't break strict aliasing rule ......................................................................
Patch Set 2:
(1 comment)
File include/osmocom/netif/ipa.h:
https://gerrit.osmocom.org/c/libosmo-netif/+/34445/comment/efa8db0e_b8ac7f96 PS2, Line 26: #warning "OSMO_IPA_MSGB_CB breaks the strict aliasing rule. Don't use unless -fno-strict-aliasing flag is enabled!" where are you seeing this problem? TBH I don't envision much of a problem here since we are accessing bytes (uint8_t) in a packed struct.
You could try a change like this instead:
struct osmo_ipa_msgb_cb { union { unsigned long cb; /* strict aliasing compat */ struct { uint8_t proto; uint8_t proto_ext; } __attribute__ ((packed)); }; } __attribute__ ((packed));
Or: union osmo_ipa_msgb_cb { unsigned long cb; /* strict aliasing compat */ struct { uint8_t proto; uint8_t proto_ext; } __attribute__ ((packed)); };