[Nagiosplug-devel] compiler warnings from -Wall -pedantic

sean finney seanius at seanius.net
Sat Jan 20 12:07:14 CET 2007


hey all,

regardless of whether we make compilation with these flags a default
thing, it's worth going over the current warning output:

fsusage.c:183:1: warning: use of C99 long long integer constant
fsusage.c:252:1: warning: use of C99 long long integer constant
fsusage.c:253:1: warning: use of C99 long long integer constant
fsusage.c:256:1: warning: use of C99 long long integer constant
fsusage.c:257:1: warning: use of C99 long long integer constant
In file included from regex.c:54:
./regex.h:654: warning: ISO C90 does not support ‘static’ or type
qualifiers in parameter array declarators
In file included from regex.c:55:
regex_internal.h:340: warning: type of bit-field ‘type’ is a GCC
extension
In file included from regex.c:59:
regexec.c: In function ‘check_node_accept_bytes’:
regexec.c:3915: warning: initializer element is not computable at load
time
utils_base.c: In function ‘_set_thresholds’:
utils_base.c:108: warning: ordered comparison of pointer with integer
zero
In file included from check_apt.c:46:
../lib/regex.h:654: warning: ISO C90 does not support ‘static’ or type
qualifiers in parameter array declarators
check_apt.c:448:11: warning: unknown escape sequence '\%'
check_disk.c: In function ‘main’:
check_disk.c:162: warning: unused variable ‘inode_space_pct’
check_disk.c: At top level:
check_disk.c:62: warning: ‘inode_format’ defined but not used
In file included from check_http.c:77:
../lib/regex.h:654: warning: ISO C90 does not support ‘static’ or type
qualifiers in parameter array declarators
check_nwstat.c: In function ‘print_help’:
check_nwstat.c:1679: warning: ISO C does not support the ‘%S’ printf
format
check_nwstat.c:1679: warning: format ‘%S’ expects type ‘wchar_t *’, but
argument 2 has type ‘char *’
In file included from check_smtp.c:79:
../lib/regex.h:654: warning: ISO C90 does not support ‘static’ or type
qualifiers in parameter array declarators
In file included from check_mysql.c:51:
/usr/include/mysql/mysql.h:114: warning: ISO C90 does not support ‘long
long’
In file included from check_mysql_query.c:47:
/usr/include/mysql/mysql.h:114: warning: ISO C90 does not support ‘long
long’
check_procs.c: In function ‘main’:
check_procs.c:196: warning: implicit declaration of function ‘base_name’
check_procs.c:196: warning: passing argument 2 of ‘strcpy’ makes pointer
from integer without a cast
In file included from check_snmp.c:94:
../lib/regex.h:654: warning: ISO C90 does not support ‘static’ or type
qualifiers in parameter array declarators
check_fping.c: In function ‘print_help’:
check_fping.c:392: warning: too many arguments for format
check_fping.c:394: warning: too many arguments for format
check_dhcp.c: In function ‘send_dhcp_discover’:
check_dhcp.c:464: warning: format ‘%lu’ expects type ‘long unsigned
int’, but argument 2 has type ‘uint32_t’
check_dhcp.c: In function ‘get_dhcp_offer’:
check_dhcp.c:539: warning: format ‘%lu’ expects type ‘long unsigned
int’, but argument 2 has type ‘uint32_t’
check_dhcp.c:545: warning: format ‘%lu’ expects type ‘long unsigned
int’, but argument 2 has type ‘uint32_t’
check_dhcp.c:545: warning: format ‘%lu’ expects type ‘long unsigned
int’, but argument 3 has type ‘u_int32_t’
check_dhcp.c:489: warning: unused variable ‘timeout’
check_dhcp.c: In function ‘send_dhcp_packet’:
check_dhcp.c:596: warning: unused variable ‘myname’
check_icmp.c:116: warning: ISO C90 does not support ‘long long’
check_icmp.c:212: warning: ISO C90 does not support ‘long long’
check_icmp.c:481:9: warning: C++ style comments are not allowed in ISO
C90
check_icmp.c:481:9: warning: (this will be reported only once per input
file)
check_icmp.c: In function ‘main’:
check_icmp.c:563: warning: ISO C90 does not support the ‘ll’ printf
length modifier
check_icmp.c:565: warning: ISO C90 does not support the ‘ll’ printf
length modifier
check_icmp.c: In function ‘run_checks’:
check_icmp.c:640: warning: ISO C90 does not support the ‘ll’ printf
length modifier

(sorry if my MUA wrapped those lines)

fwiw, this is from gcc 4.0.3 on ubuntu dapper.


	sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070120/cea7a9d2/attachment.sig>


More information about the Devel mailing list