Attention is currently required from: arehbein, daniel, laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35079?usp=email )
Change subject: osmo_io: Remove union in struct osmo_io_ops ......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4: I'd actually keep the union, imho there's nothing wrong with it if used, plus: - Doesn't break ABI with previous libosmocore release - It saves some bytes on each osmo_io (there can be a big number of them in an app).
I agree though that the comment you mentioned should be fixed by checking the correct io_mode is in used before checking the pointer, since it's shared with other io_modes through the union.
TL;DR: Fix the code bugs, leave the union.
If still others prefer merging this, I won't oppose, just saying.