[Bf-committers] unused function args & warnings.

Torsten Rupp torsten.rupp at gmx.net
Wed Oct 13 10:21:18 CEST 2010


Dear Campbell,

> We could have a #define for UNUSED() as described here.
> http://sourcefrog.net/weblog/software/languages/C/unused.html

The idea is IMHO good. I usually handle warnings like errors, because 
many times the warning give a reasonable hint for a possible bug.

If portability is an important issue something like 

#define UNUSED(x) (void)x

and placing the definitions in the function body may be better, 
because __attribute__ is not a common feature of all C compilers 
which may be used to compile Blender.

Torsten


More information about the Bf-committers mailing list