[Bf-committers] Unified warnings (was "Python Effect.c bug")
Ton Roosendaal
ton at blender.org
Sat Nov 19 19:32:13 CET 2005
Hi,
I just use the standard settings as provided in makefiles.
The dev docs on blender.org look outdated... the coding style text for
example is from NaN still. :)
I usually prevent using the // comments, but lazyness you know... afaik
all compilers we use (even the irix/solaris cc) allows this.
Someone should check make and scons warning levels to make sure it's
synced again.
-Ton-
On 19 Nov, 2005, at 19:08, Ken Hughes wrote:
> 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
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton at blender.org
http://www.blender.org
More information about the Bf-committers
mailing list