Paul Eggert <eggert@cs.ucla.edu> schrieb am So., 21. Mai 2017 um 22:33 Uhr:
Philipp Stephani wrote:
> This apparently hasn't worked, at least I still get the warning, and
> there's no -Wno-missing-braces in WARN_CFLAGS.

My change didn't add -Wno-missing-braces; it removed -Wmissing-braces. This
sufficed for Fedora 25 x86-64, which has clang 3.9.1.

Perhaps you're running a different version of Clang, which is pickier? If so,
you might try the attached patch; if it works, please feel free to install it.

I haven't tested it, but I'm pretty sure that adding -Wno-missing-braces should work.
The warnings enabled for -Wall and -Wextra change from version to version, so only leaving out -W... will often not be enough, it would be more future-proof to explicitly specify -Wno... in all cases.
 

> For Clang, it'd probably be better to use -Weverything and then disable
> individual warnings with -Wno

I'd rather not spend a lot of time worrying about warnings generated by
compilers other than recent GCC, as there are too many compilers and too many
false alarms and it's not worth the hassle.

But in practice, at least on Unix-like systems, only GCC and Clang matter, and Clang is the primary and often the only compiler on systems such as FreeBSD and macOS.
 
If you'd like to take up the burden
of pacifying Clang with tricks like the above, though, that should be fine, as
long as it doesn't burden maintenance for the rest of us. If not, and if Clang
continues to be a hassle, we can avoid much of the hassle by disabling warnings
by default when the compiler is Clang.

It's not a trick. If you don't want the warning FOO to be shown, pass -Wno-FOO. That should work consistently for both compilers and all versions. 
--

Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle

Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.