Version 4 (modified by mikehh, 13 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 avoid them.
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
Some OS X specific warnings for use of deprecated system functions. (There's an RT for this one)
config/gen/platform/darwin/dl.c:218: warning: 'NSIsSymbolNameDefined' is deprecated (declared at /usr/include/mach-o/dyld.h:150) config/gen/platform/darwin/dl.c:220: warning: 'NSLookupAndBindSymbol' is deprecated (declared at /usr/include/mach-o/dyld.h:158) config/gen/platform/darwin/dl.c:226: warning: 'NSIsSymbolNameDefinedInImage' is deprecated (declared at /usr/include/mach-o/dyld.h:156)
I (mikehh) got the following warnings at r37645 - most have been around for quite awhile, some duplicating the ones above (Infinoid), but also some additional ones.
built with - make world 2>&1 | tee make_world.37645.log
Kubuntu Intrepid i386 gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)
src/nci.c:3016: warning: dereferencing type-punned pointer will break strict-aliasing rules src/nci.c:5194: warning: dereferencing type-punned pointer will break strict-aliasing rules src/nci.c:5805: warning: dereferencing type-punned pointer will break strict-aliasing rules src/thread.c:1381: warning: suggest braces around empty body in ‘do’ statement src/thread.c:499: warning: variable ‘sub_pmc’ might be clobbered by ‘longjmp’ or ‘vfork’ src/jit_defs.c:2069: warning: logical ‘&&’ with non-zero constant will always evaluate as true src/jit_defs.c:2080: warning: logical ‘&&’ with non-zero constant will always evaluate as true ./src/pmc/sub.pmc:891: warning: logical ‘&&’ with non-zero constant will always evaluate as true compilers/imcc/imcc.y:739: warning: unused parameter ‘interp’ compilers/imcc/imcparser.c:2848: warning: statement with no effect compilers/imcc/imcparser.c:4938: warning: logical ‘&&’ with non-zero constant will 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/imcc.l:731: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result compilers/imcc/imclexer.c:4165: warning: comparison between signed and unsigned compilers/imcc/imcc.l:1306: warning: variable ‘buffer’ might be clobbered by ‘longjmp’ or ‘vfork’ compilers/imcc/imcc.l:1338: warning: variable ‘buffer’ might be clobbered by ‘longjmp’ or ‘vfork’ compilers/imcc/instructions.c:176: warning: logical ‘&&’ with non-zero constant will always evaluate as true compilers/imcc/reg_alloc.c:738: warning: logical ‘&&’ with non-zero constant will always evaluate as true ./gdbmhash.pmc:238: warning: function call has aggregate value ./gdbmhash.pmc:176: warning: function call has aggregate value ./gdbmhash.pmc:150: warning: function call has aggregate value ./gdbmhash.pmc:152: warning: function call has aggregate value myops_ops_switch.c:151: warning: dereferencing type-punned pointer will break strict-aliasing rules pbc_to_exe.c:391: warning: dereferencing type-punned pointer might break strict-aliasing rules parrot_config.c:86: warning: dereferencing type-punned pointer might break strict-aliasing rules