Version 13 (modified by coke, 11 years ago) |
---|
Warnings seen during the build don't necessarily warrant tickets of their own, since they aren't breaking the build. However, one of our goals is to have a (nearly) warnings-free build, so if your build has warnings, document them here, and someone may eventually be able to fix them or update config/auto/warnings.pm to stop complaining about them.
Latest batch from OS X 10.6.4, gcc 4.2.1, @ 31eeb30
src/dynext.c:687: warning: âhandleâ may be used uninitialized in this function src/gc/system.c:341: warning: signed and unsigned type in conditional expression src/gc/fixed_allocator.c:398: warning: comparison between signed and unsigned src/gc/fixed_allocator.c:442: warning: comparison of distinct pointer types lacks a cast src/gc/fixed_allocator.c:445: warning: comparison of distinct pointer types lacks a cast src/global_setup.c:202:5: warning: "PARROT_HAS_LIBFFI" is not defined src/hash.c:701: warning: cast from function call of type âINTVALâ to non-matching type âenum <anonymous>â src/hash.c:702: warning: cast from function call of type âINTVALâ to non-matching type âenum <anonymous>â src/library.c:449: warning: comparison between signed and unsigned src/nci/signatures.c:184: warning: cast from function call of type âINTVALâ to non-matching type âenum <anonymous>â src/nci/signatures.c:188: warning: switch missing default case config/gen/platform/darwin/sysmem.c:37: warning: no previous prototype for âParrot_sysmem_amountâ src/runcore/main.c:343: warning: comparison between signed and unsigned src/runcore/main.c:345: warning: cast discards qualifiers from pointer target type src/runcore/main.c:348: warning: cast discards qualifiers from pointer target type src/runcore/main.c:349: warning: cast discards qualifiers from pointer target type src/runcore/profiling.c:632: warning: comparison between signed and unsigned src/packfile.c:2611: warning: comparison between signed and unsigned src/packfile.c:2653: warning: comparison between signed and unsigned src/packfile.c:2715: warning: comparison between signed and unsigned src/packfile.c:2777: warning: comparison between signed and unsigned ./src/pmc/oplib.pmc:95: warning: comparison between signed and unsigned ./src/pmc/oplib.pmc:128: warning: comparison between signed and unsigned ./src/pmc/imageiothaw.pmc:240: warning: cast discards qualifiers from pointer target type ./src/pmc/imageiothaw.pmc:220: warning: cast discards qualifiers from pointer target type ./src/pmc/imageiothaw.pmc:276: warning: cast discards qualifiers from pointer target type /opt/local/include/unicode/uset.h:250: warning: function declaration isnât a prototype compilers/imcc/optimizer.c:806: warning: cast discards qualifiers from pointer target type compilers/imcc/parser_util.c:233: warning: cast discards qualifiers from pointer target type compilers/imcc/pbc.c:1690: warning: cast discards qualifiers from pointer target type src/glut_callbacks.c:1037: warning: âglutWMCloseFuncâ is deprecated (declared at /System/Library/Frameworks/GLUT.framework/Headers/glut.h:469) src/glut_callbacks.c:1039: warning: âglutWMCloseFuncâ is deprecated (declared at /System/Library/Frameworks/GLUT.framework/Headers/glut.h:469) ld: warning: directory '/Users/coke/sandbox/parrot/blib/lib' following -L not found src/glut_nci_thunks.c:6249: warning: no previous prototype for âParrot_glut_nci_loaderâ src/extra_nci_thunks.c:6703: warning: no previous prototype for âParrot_lib_extra_nci_thunks_initâ
The following warnings appear for me (Infinoid) on x86-64 gentoo linux, but are caused by system headers and thus are not Parrot's fault:
src/thread.c: In function 'pt_thread_join': src/thread.c:1381: warning: suggest braces around empty body in 'do' statement ./gdbmhash.pmc: In function 'Parrot_GDBMHash_get_string_keyed': ./gdbmhash.pmc:238: warning: function call has aggregate value ./gdbmhash.pmc: In function 'Parrot_GDBMHash_get_bool': ./gdbmhash.pmc:176: warning: function call has aggregate value ./gdbmhash.pmc: In function 'Parrot_GDBMHash_get_integer': ./gdbmhash.pmc:150: warning: function call has aggregate value ./gdbmhash.pmc:152: warning: function call has aggregate value
The following warnings are in IMCC, and have never gotten much attention because IMCC will eventually be deprecated:
compilers/imcc/imcparser.c: In function 'yyparse': compilers/imcc/imcparser.c:2848: warning: statement with no effect compilers/imcc/imcparser.c:4938: warning: logical '&&' with non-zero constant wi ll always evaluate as true compilers/imcc/imcparser.c:4941: warning: statement with no effect compilers/imcc/imcparser.c:5098: warning: statement with no effect compilers/imcc/imcparser.c:5102: warning: statement with no effect compilers/imcc/imclexer.c: In function 'yy_get_next_buffer': compilers/imcc/imclexer.c:4165: warning: comparison between signed and unsigned
The following warning is also in IMCC, but is really caused by headerizer not understanding #if blocks:
compilers/imcc/pbc.c:181: warning: 'old_blocks' declared 'static' but never defined
dukeleto: some warnings that I get during the build on OS X 10.5.8/GMP 4.3.1 :
src/pmc/bignum.c In file included from ./src/pmc/bignum.pmc:148: /opt/local/include/gmp.h:431:74: warning: "__STDC_VERSION__" is not defined In file included from ./src/pmc/bigint.pmc:32: /opt/local/include/gmp.h:431:74: warning: "__STDC_VERSION__" is not defined compilers/imcc/imcparser.c: In function ‘yyparse’: compilers/imcc/imcparser.c:3092: warning: statement with no effect compilers/imcc/imcparser.c:5230: warning: statement with no effect compilers/imcc/imcparser.c:5387: warning: statement with no effect compilers/imcc/imcparser.c:5391: warning: statement with no effect compilers/imcc/imcc.y:1360: warning: ignoring return value of ‘iSUBROUTINE’, declared with attribute warn_unused_result compilers/imcc/pbc.c:184: warning: ‘old_blocks’ declared ‘static’ but never defined
mikehh: as of r48016 building on Ubuntu 10.04 amd64/i386 versions (gcc/g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3)
There were some differences in the gcc/g++ (with or without --optimize) but, the the platform (i386/amd64) did not make a difference in the warnings produced.
The following warnings were extracted from the logged output of make world (8 builds in all):
(common): src/runcore/trace.c: In function ‘trace_key_dump’: (gcc) or src/runcore/trace.c: In function ‘int trace_key_dump(parrot_interp_t*, PMC*)’: (g++) src/runcore/trace.c:243: warning: comparison between signed and unsigned integer expressions (without --optimize): ./src/pmc/imageio.pmc: In function ‘visit_todo_list_thaw’: (gcc) or ./src/pmc/imageio.pmc: In function ‘PMC* visit_todo_list_thaw(parrot_interp_t*, PMC*)’: (g++) ./src/pmc/imageio.pmc:266: warning: comparison between signed and unsigned integer expressions g++ (with or without --optimize) ./src/pmc/imageio.pmc: In function ‘FLOATVAL Parrot_ImageIO_shift_float(parrot_interp_t*, PMC*)’: ./src/pmc/imageio.pmc:613: warning: cast from type ‘opcode_t**’ to type ‘const opcode_t**’ casts away constness ./src/pmc/imageio.pmc: In function ‘INTVAL Parrot_ImageIO_shift_integer(parrot_interp_t*, PMC*)’: ./src/pmc/imageio.pmc:593: warning: cast from type ‘opcode_t**’ to type ‘const opcode_t**’ casts away constness ./src/pmc/imageio.pmc: In function ‘STRING* Parrot_ImageIO_shift_string(parrot_interp_t*, PMC*)’: ./src/pmc/imageio.pmc:652: warning: cast from type ‘opcode_t**’ to type ‘const opcode_t**’ casts away constness (common): compilers/imcc/imclexer.c: In function ‘yy_get_next_buffer’: (gcc) or compilers/imcc/imclexer.c: In function ‘int yy_get_next_buffer(void*)’: (g++) compilers/imcc/imclexer.c:4209: warning: comparison between signed and unsigned integer expressions (with --optimize): compilers/imcc/symreg.c: In function ‘int_overflows’: (gcc) compilers/imcc/symreg.c:861: warning: ignoring return value of ‘strtol’, declared with attribute warn_unused_result compilers/imcc/symreg.c:864: warning: ignoring return value of ‘strtoul’, declared with attribute warn_unused_result or compilers/imcc/symreg.c: In function ‘int int_overflows(const SymReg*)’: (g++) compilers/imcc/symreg.c:861: warning: ignoring return value of ‘long int strtol(const char*, char**, int)’, declared with attribute warn_unused_result compilers/imcc/symreg.c:864: warning: ignoring return value of ‘long unsigned int strtoul(const char*, char**, int)’, declared with attribute warn_unused_result the next two warnings are gcc (with or without --optimize): src/glut_nci_thunks.c:7835: warning: no previous prototype for ‘Parrot_glut_nci_loader’ src/extra_nci_thunks.c:6704: warning: no previous prototype for ‘Parrot_lib_extra_nci_thunks_init’ and finally with g++ (with or without --optimize): src/nci_test.c:139: warning: ‘int_cb_D4’ initialized and declared ‘extern’ src/nci_test.c:140: warning: ‘nci_dlvar_char’ initialized and declared ‘extern’ src/nci_test.c:141: warning: ‘nci_dlvar_short’ initialized and declared ‘extern’ src/nci_test.c:142: warning: ‘nci_dlvar_int’ initialized and declared ‘extern’ src/nci_test.c:143: warning: ‘nci_dlvar_long’ initialized and declared ‘extern’ src/nci_test.c:144: warning: ‘nci_dlvar_float’ initialized and declared ‘extern’ src/nci_test.c:145: warning: ‘nci_dlvar_double’ initialized and declared ‘extern’ src/nci_test.c:146: warning: ‘nci_dlvar_cstring’ initialized and declared ‘extern’