[S] Change in libosmo-netif[master]: ipa: Don't break strict aliasing rule
arehbein has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email ) Change subject: ipa: Don't break strict aliasing rule ...................................................................... ipa: Don't break strict aliasing rule Somehow gcc doesn't always warn about this rule being broken. We are breaking the strict aliasing rule here and libosmo-netif currently does not make use of the '-fno-strict-aliasing' flag. It's possible that this has also been causing nondeterministic timestamps in libosmo-netif stream tests every once in a while. Related: OS#6164, OS#5753 Change-Id: Ibed543cdfcdda8c0256ce7d8818ff96d6d46e9b0 --- M include/osmocom/netif/ipa.h 1 file changed, 19 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/45/34445/1 diff --git a/include/osmocom/netif/ipa.h b/include/osmocom/netif/ipa.h index 1923253..920f0c9 100644 --- a/include/osmocom/netif/ipa.h +++ b/include/osmocom/netif/ipa.h @@ -18,14 +18,8 @@ uint8_t data[0]; } __attribute__ ((packed)); -struct osmo_ipa_msgb_cb { - uint8_t proto; - uint8_t proto_ext; -} __attribute__ ((packed)); - -#define OSMO_IPA_MSGB_CB(__msg) ((struct osmo_ipa_msgb_cb *)&((__msg)->cb[0])) -#define osmo_ipa_msgb_cb_proto(__x) OSMO_IPA_MSGB_CB(__x)->proto -#define osmo_ipa_msgb_cb_proto_ext(__x) OSMO_IPA_MSGB_CB(__x)->proto_ext +#define osmo_ipa_msgb_cb_proto(STRUCT_MSGB_PTR) (STRUCT_MSGB_PTR)->cb[0] +#define osmo_ipa_msgb_cb_proto_ext(STRUCT_MSGB_PTR) (STRUCT_MSGB_PTR)->cb[1] struct msgb *osmo_ipa_msg_alloc(int headroom); struct msgb *osmo_ipa_ext_msg_alloc(size_t headroom); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ibed543cdfcdda8c0256ce7d8818ff96d6d46e9b0 Gerrit-Change-Number: 34445 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
arehbein