[Top][All Lists]

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

Re: xalloc: missing prototype

From: Paul Eggert
Subject: Re: xalloc: missing prototype
Date: Thu, 06 Dec 2012 09:48:42 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/06/12 00:05, Akim Demaille wrote:
> Is there some documentation/page/whatever detailing the decisions
> (and their rationale) that gnulib has made with respect to compiler
> warnings?

I'm afraid not.  It's haphazard and pretty much depends on the
compiler being used by the coreutils developers (for gnulib
modules they maintain) and similarly for the other gnulib

Looking through your diagnostics, I see two types.

In file included from ../../../lib/mbschr.c:23:0:
../../../lib/mbschr.c: At top level:
../../../lib/mbuiter.h:201:181: warning: '__inline_memset_chk' is static but 
used in inline function 'mbuiter_multi_copy' which is not static [enabled by 
     memset (&new_iter->state, 0, sizeof (mbstate_t));

This (and similar warnings) appear to be a bug in the
build environment.  It ought to be OK
to invoke memset from an extern inline function.
My guess is that the warning can be safely ignored.
You might want to file a bug report with Apple or

If you can think of a way to work around the
bug, we can put that into Gnulib.  Perhaps, for example,
we can modify m4/extern-inline.m4 to detect your platform
and to "# define _GL_INLINE static" and
"# define _GL_EXTERN_INLINE static" on your platform.
Would that do the trick?

../../../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).

reply via email to

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