You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Replace some bogus "x[1]" declarations with "x[FLEXIBLE_ARRAY_MEMBER]".Aside from being more self-documenting, this should help prevent boguswarnings from static code analyzers and perhaps compiler misoptimizations.This patch is just a down payment on eliminating the whole problem, butit gets rid of a lot of easy-to-fix cases.Note that the main problem with doing this is that one must no longer relyon computing sizeof(the containing struct), since the result would becompiler-dependent. Instead use offsetof(struct, lastfield). Autoconfalso warns against spelling that offsetof(struct, lastfield[0]).Michael Paquier, review and additional fixes by me.