Michal Srb <[email protected]> writes: > The _XimCacheStruct structure is followed in memory by two strings containing > fname and encoding. The memory was accessed using the last member of the > structure `char fname[1]`. That is a lie, prohibits us from using sizeof and > confuses checkers. Lets declare it properly as a flexible array, so compilers > don't complain about writing past that array. As bonus we can replace the > XOffsetOf with regular sizeof.
Thanks; this form is how we used to need to do this as C compilers didn't support a flexible array at the end of a struct... Reviewed-by: Keith Packard <[email protected]> -- -keith
signature.asc
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
