Attention is currently required from: dexter, laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email )
Change subject: ecu: force alignment of member data in struct osmo_ecu_state ......................................................................
Patch Set 6:
(1 comment)
File src/codec/ecu_fr.c:
https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/81ccd77f_c408102a PS5, Line 315: struct fr_ecu_state *fr = (struct fr_ecu_state *) st;
Thanks. I have added this now as suggested, but I still do not understand where the advantage is. […]
It removes the need of having one struct being the first field of the other one, plus avoid having problems in the future if somebody decides to add other fields.
This way the compiler is responsible for calculating the address instead of tricking it through explicit casting.