[LTP] [PATCH] config.mk.in: build.sh: Add -Wno-missing-field-initializers to CFLAGS

Petr Vorel pvorel@suse.cz
Thu Dec 8 15:55:26 CET 2022


> Hi!
> > Add CFLAGS -Wno-missing-field-initializers to suppress the
> > compilation warnings like:

> > autogroup01.c:87:1: warning: missing initializer for field ‘needs_cmds’ of ‘struct tst_test’ [-Wmissing-field-initializers]
> >  };
> >  ^
> > In file included from autogroup01.c:21:0:
> > ../../../../include/tst_test.h:324:21: note: ‘needs_cmds’ declared here
> >   const char *const *needs_cmds;

> This is actually caused by a gcc bug that has been already fixed see:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84685

> And I do not think that it's a good idea to work around gcc warnings in
> our build system.

I would not workaround it either.

Kind regards,
Petr


More information about the ltp mailing list