[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trivial patches to silence -Wundef
From: |
Tim Rühsen |
Subject: |
Re: Trivial patches to silence -Wundef |
Date: |
Wed, 05 Apr 2017 19:56:04 +0200 |
User-agent: |
KMail/5.2.3 (Linux/4.9.0-2-amd64; KDE/5.28.0; x86_64; ; ) |
On Mittwoch, 5. April 2017 10:29:25 CEST Eric Blake wrote:
> On 04/05/2017 08:47 AM, Tim Rühsen wrote:
> > These patches silence tons of warnings here...
>
> In general, we do NOT try to make gnulib .c files '-Wundef'-clean. The
> best solution is to not use -Wundef on gnulib compilation (even if you
> want to use it on your .c files). Of course, that means that .h files
> are in the gray area where we've taken patches to silence -Wundef
> warnings in the past.
Hi Eric,
while i can (and do) give the gnulib files their own CFLAGS, I can't and won't
leave out -Wundef on my own C files. Since these include gnulib's header files,
I am currently swamped with -Wundef warnings. Especially when cross-compiling
for Windows. It is really pretty hard to manually sort out the 'relevant'
warnings between these. It also prevents compiling with -Werror which belongs
to "C best practices", e.g. CI immediately fails when a patch introduces new
warnings.
However, the patches solve all -Wundef issues at least for my project which
includes many gnulib modules. Also, changing #if to #ifdef at particular
places is no bloat or something, more of a (pedantic) cleanup, so it's
nothing bad.
So please consider at least the ENABLE_NLS patch to be applied, since the
related warnings pop up in almost every C file compiled. The OPENSSL related
warnings are less annoying, they just pop up once.
Regards, Tim
signature.asc
Description: This is a digitally signed message part.