[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Clean up a couple of compiler warnings

From: Philipp Stephani
Subject: Re: [PATCH] Clean up a couple of compiler warnings
Date: Sun, 21 May 2017 20:00:11 +0000

Paul Eggert <address@hidden> schrieb am So., 21. Mai 2017 um 08:07 Uhr:
On 05/19/2017 02:31 AM, Philipp Stephani wrote:
> Apparently on some systems mbstate_t is a nested struct, and the compiler
> warns about missing braces. Note that memset to initialize a mbstate_t is
> explicitly recommended in the libc manual:

Yes, of course memset works (which is all that the glibc manual really says).
It's just that it's verbose and the verbosity isn't needed.

I guess the problem here is that clang's -Wmissing-braces option generates false
alarms. The Clang folks may fix that someday. In the meantime I installed the
first attached patch, to turn off that option for Clang.

This apparently hasn't worked, at least I still get the warning, and there's no -Wno-missing-braces in WARN_CFLAGS.
For Clang, it'd probably be better to use -Weverything and then disable individual warnings with -Wno... instead of checking for the existence of every warning flag. That would make configure runs faster and the command line shorter.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]