[Top][All Lists]

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

Re: Wget compilation spammed with warnings and notes

From: Paul Eggert
Subject: Re: Wget compilation spammed with warnings and notes
Date: Mon, 13 Jun 2016 11:34:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 06/13/2016 07:52 AM, Tim Ruehsen wrote:
Especially -Wlong-long and -pedantic floods the screen with warnings and notes
from gnulib modules. Finding any warnings emanated by Wget sources becomes
very tedious. Some example output below.

What do you suggest to avoid the verbose output from gnulib modules ?

These days to be frank C89 is lower priority. Gnulib still supports C89 but I think most downstream projects have switched to C99 or later. The issue you mention is merely about compile-time-diagnostics, not about correctness, which makes it lower-priority still. That being said....

../lib/xalloc-oversized.h:41:5: warning: ISO C forbids braced-groups within
expressions [-Wpedantic]
      ({ size_t __xalloc_size; __builtin_mul_overflow (n, s, &__xalloc_size);

I fixed that by installing the attached patch. I'd been meaning to do something in that area anyway, to accommodate the forthcoming GCC 7, so I did both at the same time.

../lib/intprops.h:85:28: warning: ISO C90 does not support 'long long' [-
  verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);

I wouldn't worry about these. Any C89 compiler that defines LLONG_MAX without implementing 'long long' is (in a practical sense) busted anyway. I suggest adding -Wno-long-long to your compile-time options. You could tack it onto the end of the existing options, e.g.:

./configure CFLAGS="-std=c89 -pedantic -O2 -g -Wall -Wextra -Wstrict-prototypes -Wold-style-definition -Wwrite-strings -Wshadow -Wformat -Wformat-security -Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wno-long-long"

Or perhaps wget should start using Gnulib's manywarnings module, which does a better job of this sort of thing anyway.

Attachment: 0001-xalloc-oversized-port-to-GCC-7-fewer-warnings.patch
Description: Source code patch

reply via email to

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