[Top][All Lists]

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

Re: enable -Werror for lib/ in coreutils

From: Jim Meyering
Subject: Re: enable -Werror for lib/ in coreutils
Date: Wed, 28 Oct 2009 13:00:14 +0100

Jim Meyering wrote:
> With these two change sets, ./configure --enable-gcc-warnings && make
> in builds with most warnings enabled also in lib/.
> To make that work, I've chosen to disable-in-lib/ some warning options, via
>   -Wno-missing-prototypes
>   -Wno-uninitialized
>   -Wno-unused-macros
>   -Wno-old-style-definition"
> In addition, I've removed the offending "Unsigned_var < 0" tests
> from lib/reg*.c files, but added a few verify (! TYPE_SIGNED (Idx));
> statements to ensure that the code doesn't compile if someone
> ever changes "Idx" to be a signed type.
> Bruno, I've patched isnan.c (no previous declaration of rpl_isnan) and
> unicodeio.c's fwrite_success_callback (ignored fwrite return value).
> IMHO, those two changes could easily go into gnulib.
> Regarding the regex and strftime changes, if others are interested in
> doing the same thing to their packages, and (like me) don't want to turn
> off the -W option that was evoking warnings, let me know and I'll push
> some variant of these patches to gnulib.  The fewer gl/lib/*.diff files
> I have to carry in coreutils the better.
> I'd welcome a careful review of the reg*.c changes.

I've pushed-to-gnulib the strftime.c and exclude.c changes,
but left the gl/lib/reg*.c.diff patches in coreutils for now.
With that change set (now pushed to coreutils), and another updating
to use the latest from gnulib, compiling all of coreutils now uses
-Werror and passes on modern linux/gnu (F11/F12) with recent gcc
(e.g., 4.4.2 20091018).  This assumes you configure with

reply via email to

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