So because super is the first member, the "recovered container
pointer" should *always* be equal to the
original pointer, and because the structure is *private to ell/dbus.c*, we can work
around this warning by not
using l_container_of(), and instead simply casting the point directly in the 4 places the
macro is used. The
only time this would not work is if a compiler decides to re-arrange the members of the
Unless of course the compiler decides to reorder the structure elements
somehow. So you'd also need to make the structure packed or play some
other tricks and hope no-one rearranges the structure in the future.
Also, l_container_of is used in iwd.
And really, why are we trying to fix something that isn't broken? :)
Look carefully at what that macro is doing, it is casting to (char *)
only for purposes of pointer arithmetic. There's no possibility of any
misalignment. The compiler is just being silly.