bug-gnulib
[Top][All Lists]
Advanced

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

Re: xalloc: missing prototype


From: Jim Meyering
Subject: Re: xalloc: missing prototype
Date: Fri, 07 Dec 2012 01:18:32 +0100

Paul Eggert wrote:
...
> ../../../lib/basename-lgpl.c:50:10: warning: cast discards 
> '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
>    return (char *) base;
>
> This is harmless.
> Perhaps basename-lgpl.c should add a suitably-protected
> # pragma GCC diagnostic ignored "-Wcast-qual"
> and similarly for the other modules that have this problem.
> Or maybe it's simpler for you to disable that warning
> in the makefile that compiles gnulib code (this is what
> others do, I expect).

Hi Akim,

I've turned off -Wcast-qual warning for coreutils, grep, diffutils, etc.
For us, that seems to be the best route, since we try hard not to
add new casts (so there's little risk of introducing new violations),
and since the few code sites that provoke warnings have already been
carefully examined.



reply via email to

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