[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33936] trunk/blender/source/blender/ blenkernel/intern: Silencing some compiler warnings (gcc)

GSR gsr.b3d at infernal-iceberg.com
Fri Dec 31 21:02:37 CET 2010


Hi,
ideasman42 at gmail.com (2010-12-31 at 0744.36 +0000):
> What GCC version are you using?
> 
> I dont get any warnings with either of these files:
> gcc version 4.5.2
> 
> warning flags:
>  -Wunused-value -Wclobbered  -Wold-style-declaration -Woverride-init
> -Wuninitialized -Winit-self -Wmissing-include-dirs
> -Wignored-qualifiers -Woverride-init -Werror -Wall -Wcast-align
> -Werror=declaration-after-statement
> -Werror=implicit-function-declaration -Werror=return-type
> -Werror=strict-prototypes -Wno-char-subscripts -Wno-unknown-pragmas
> -Wpointer-arith -Wunused-parameter -Wwrite-strings
> > -               float start, end;
> > +               float start=0.0f, end=0.0f;

It is not a matter of version, but parameters. You put a lots of -W (I
wonder if it would not be shorter to use -pedantic, -Wextra and then
disable some) but miss -O1 (or higher) so -Wuninitialized does
nothing.

Currently there are a small group of warnings left, specially in .cpp
files about signed with unsigned comparison or offsetof. Other small
handful are about printf, caused mostly by LLP64 vs LP64 and a
meaningless intprt_t (the warnings probably only appear on ILP32) for
which I have a tentative fix, but being "lib" files no idea if worth.

GSR
 


More information about the Bf-committers mailing list