[Bf-committers] Unified warnings (was "Python Effect.c bug")
Ken Hughes
khughes at pacific.edu
Sat Nov 19 19:08:01 CET 2005
Ton Roosendaal wrote:
> Hi,
>
> In function:
>
> PyObject *M_Effect_New( PyObject * self, PyObject * args )
>
> the pointer BPy_Effect *pyeffect is being used without being set. This
> can only give crashes... so I wonder if really nobody cares about the
> useful warning messages you get? :)
>
> What we really need is to make a unified/compatible warning level for
> all our make systems. And especially for Scons: add a (default!) option
> to not print the full gcc lines, but only a very nice single liner, so
> you notice while compiling immediately what gcc thinks of it.
>
> Example, this is what 'make' prints for me with NAN_QUIET set, in
> python directory:
>
> -- Armature.c --
> -- Blender.c --
> -- Draw.c --
> -- Effect.c --
> Effect.c: In function `M_Effect_New':
> Effect.c:542: warning: `pyeffect' might be used uninitialized in this
> function
> Effect.c: In function `M_Effect_Get':
> Effect.c:587: warning: unused variable `wanted_eff'
> -- Key.c --
> -- Lattice.c --
> -- Mesh.c --
> -- NMesh.c --
> -- Object.c --
> -- Scene.c --
> -- Texture.c --
> -- Window.c --
scons -s (or --quiet or --silent) will suppress printing the commands
being executed.
I've set up my config.opts to use the compiler flags given here:
http://www.blender.org/cms/Compiler_and_Linker_Us.149.0.html
and found that while I now gets tons of warning from elsewhere, there is
still no warning for uninitialized variables. For that I needed to add
'-O -Wuninitialized' (with gcc 3.3.5 on ubuntu).
But while we're on the subject of unified warnings and compiler flags,
I'd like to put in a vote for removal of "//" comments in C code (which
is stated at http://www.blender.org/cms/Layout.145.0.html). I've not
been able to find a way to allow these C++ comments in C code while
having the compiler to check for c89 compatibility. If someone knows
the gcc flags which will do that, please let me know.
Ken
More information about the Bf-committers
mailing list