Skip to contentSkip to conversation

config.mk.in: build.sh: Add -Wno-missing-field-initializers to CFLAGS

PATCH zhaogongyi via ltp 2 participants 2 messages Dec 9, 2022

lore
Share & tools
lore
#0 lore raw

Hi!

Quoted 11 lines

Hi!

Quoted 8 lines

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;

Quoted 3 lines

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

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

Thank you for your notice.

Quoted 4 lines

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

I haven't paid attention to other warning messages now. Maybe they should be ignored as well.

Regards,
Gongyi

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw
Quoted 13 lines

Hi!

Quoted 9 lines

Hi!

Quoted 8 lines

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;

Quoted 9 lines
Quoted 3 lines

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

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

Thank you for your notice.

Quoted 2 lines

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

It's just matter of time when old gcc passes away.

Quoted 1 line

I haven't paid attention to other warning messages now. Maybe they should be ignored as well.

Most of the warnings are valid and should be fixed. That takes time, but we all slowly work on it. Anyway, warning are here for a reason, I prefer to have false positives than lost valid warning.

Kind regards,
Petr

Quoted 2 lines

Regards,
Gongyi

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp