argtable / argtable3

A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options.
http://www.argtable.org
Other
377 stars 65 forks source link

argtable3.c:493:5: warning: implicit declaration of function ‘warnx’ #7

Closed scottidler closed 9 years ago

scottidler commented 9 years ago

when compiled with -std=c11 on linux, the following error reports:

compiles without warning

<(((º> gcc -c argtable3.c -o argtable3.o

compiles with warning

<(((º> gcc -std=c11 -c argtable3.c -o argtable3.o argtable3.c: In function ‘parse_long_options’: argtable3.c:493:5: warning: implicit declaration of function ‘warnx’ [-Wimplicit-function-declaration] warnx(ambig, (int)current_argv_len, ^

scottidler commented 9 years ago

It does say it is ANSI C. But it would be nice if it compiled with c11 and -Wall and -Werror

surreylabs commented 9 years ago

You are right. The library should be compiled without warnings under C11. I will fix this issue. Thanks.

LefterisJP commented 9 years ago

+1 Just got this and other warnings while compiling with C99.

Please accept #3 and #4 (possibly also #5 ??, can't speak for Windows) to get those warnings fixed.

tomghuang commented 9 years ago

Fixed in v3.0.1.