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));
};



--
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: 2
Gerrit-Owner: arehbein <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-CC: pespin <[email protected]>
Gerrit-Attention: arehbein <[email protected]>
Gerrit-Attention: fixeria <[email protected]>
Gerrit-Attention: daniel <[email protected]>
Gerrit-Attention: dexter <[email protected]>
Gerrit-Comment-Date: Mon, 18 Sep 2023 09:08:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Reply via email to