Werner LEMBERG wrote: > Compiling getopt.c I get these warnings from gcc: > > getopt.c: In function `_getopt_initialize': > getopt.c:253: warning: unused parameter `argc' > getopt.c:253: warning: unused parameter `argv' > getopt.c:1159:5: warning: "_LIBC" is not defined
You get these warnings only when you use -W and -Wall simultaneously. The gcc doc says about these "Some of them warn about constructions that users generally do not consider questionable, but which occasionally you might wish to check for; others warn about constructions that are necessary or hard to avoid in some cases, and there is no simple way to modify the code to suppress the warning." We do something about this kind of warnings when they indicate bugs, but otherwise we let gcc complain. However, we try to eradicate all "gcc -Wall" warnings. Especially the warning: "_LIBC" is not defined will be repeated hundreds of times for various HAVE_... feature macros. We have adopted the style #if HAVE_XXX instead of #ifdef HAVE_XXX because it allows the HAVE_XXX to carry the value 0 and thus to be used inside normal C expressions, not only in preprocessor expressions. But evidently in many cases the autoconf test sets HAVE_XXX to 1 or doesn't define it at all; that's the traditional autoconf behaviour. Bruno _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib