[Bf-committers] new round of warning hunt : some goofy things
i cant decide on
vmilitaru at sympatico.ca
Sat Jun 4 20:25:36 CEST 2005
Jean-Luc Peuriere wrote:
> Le 4 juin 05, à 13:29, Vio a écrit :
>> Duh. I've heard somewhere that *casts* is a way to cheat the
>> compiler, but then again, if you
>> want your code to compile, what other choice is there (besides
>> hacking the offending sources)?
>> I personally find signed/unsigned keywords more annoying than
>> anything else, but then again,
>> I'm just a clueless newbie. I guess coding style may play a little here.
>> By the way, if using gcc, you may find the "-w" flag useful in such
> It's not cheating, but insuring that the compiler do what is needed.
> Of course, doing this kind
> of promotion manually means that you are on your own and must
> understand exactly what is
Well, I think we can throw valid arguments both ways. But I like the
'cheating' argument, though
I forgot where I read it first, it has a nice 'disruptive' ring to it.
Now going further on this, I fear, may blow us too much off topic.
> -w alone is useless as it will report duty fully the unused parameters
> of functions which in the case of
> blender leads to warnings in the 1000s. -W -Wno-unused-parameter is ok
> but will report too much,
> i think
Ahem, quoting from fledging organic memory, I believe '-w' for gcc means
'shut off all the warnings'.
This is quite useful since displying both warnings and errors 'ad hoc'
can create quite a mess on my HUD.
Warnings don't stop the compiling, while errors do. Hence, removing
warnings from the equation
is good for my sanity. I personally don't really care for perfect
warning-free code, just for the beast
to compile, so I could play with my new toy.
Some purists may frown at this, but hey, we each have different
priorities and values, I guess :)
More information about the Bf-committers