Menu

#5 0.6 gcc 4.6.2 compiling messages

open
nobody
None
5
2012-02-11
2012-02-11
Jari Aalto
No

FYI;

Following warnings are displayed form the code. Perhaps these could be addressed.

gcc -DPACKAGE=\"fuzz\" -DVERSION=\"0.6\" -DHAVE_LIBREADLINE=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 -DRETSIGTYPE=void -DHAVE_GETCWD=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_SNPRINTF=1 -I. -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -pedantic -c fuzz.c
fuzz.c:41:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
fuzz.c:41:1: warning: (this will be reported only once per input file) [enabled by default]
fuzz.c: In function 'main':
fuzz.c:166:3: warning: missing braces around initializer [-Wmissing-braces]
fuzz.c:166:3: warning: (near initialization for 'longopts[17]') [-Wmissing-braces]
fuzz.c:182:7: warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'long unsigned int *' [-Wformat]
fuzz.c:188:7: warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'long unsigned int *' [-Wformat]
fuzz.c:197:7: warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'long unsigned int *' [-Wformat]
fuzz.c:203:7: warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'long unsigned int *' [-Wformat]
fuzz.c:209:7: warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'long unsigned int *' [-Wformat]
fuzz.c:234:7: warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'long unsigned int *' [-Wformat]
fuzz.c:240:7: warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'long unsigned int *' [-Wformat]
fuzz.c:412:5: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat]
fuzz.c:389:21: warning: unused variable 'status' [-Wunused-variable]
fuzz.c:168:8: warning: unused variable 'bin_found' [-Wunused-variable]
fuzz.c: In function 'print_arglist':
fuzz.c:524:3: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'char **' [-Wformat]
fuzz.c:526:5: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'char *' [-Wformat]
fuzz.c:532:4: warning: '0' flag ignored with precision and '%x' gnu_printf format [-Wformat]
fuzz.c: In function 'do_child':
fuzz.c:647:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
fuzz.c:577:16: warning: unused variable 'buflen' [-Wunused-variable]
fuzz.c:576:8: warning: unused variable 'buf' [-Wunused-variable]
fuzz.c: In function 'setup_user':
fuzz.c:857:5: warning: string length '973' is greater than the length '509' ISO C90 compilers are required to support [-Woverlength-strings]
fuzz.c:912:12: warning: unused variable 'cur' [-Wunused-variable]
fuzz.c:925:19: warning: unused variable 'cur' [-Wunused-variable]
fuzz.c:941:4: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
fuzz.c:943:4: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
fuzz.c: In function 'do_child':
fuzz.c:808:10: warning: 'argfilefd' may be used uninitialized in this function [-Wuninitialized]
fuzz.c: In function 'main':
fuzz.c:480:9: warning: 'outfile' may be used uninitialized in this function [-Wuninitialized]
fuzz.c:424:15: warning: 'randfd' may be used uninitialized in this function [-Wuninitialized]
gcc -DPACKAGE=\"fuzz\" -DVERSION=\"0.6\" -DHAVE_LIBREADLINE=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 -DRETSIGTYPE=void -DHAVE_GETCWD=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_SNPRINTF=1 -I. -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -pedantic -c getopt.c
gcc -DPACKAGE=\"fuzz\" -DVERSION=\"0.6\" -DHAVE_LIBREADLINE=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 -DRETSIGTYPE=void -DHAVE_GETCWD=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_SNPRINTF=1 -I. -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -pedantic -c getopt1.c
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -pedantic -Wl,-z,relro -Wl,--as-needed -o fuzz fuzz.o getopt.o getopt1.o -lreadline

Discussion


Log in to post a comment.