[Rawstudio-dev] [PATCH] sparse spotted errors and warnings
anders at brander.dk
Wed Jan 3 19:55:24 CET 2007
On Wed, 2007-01-03 at 19:25 +0100, Edouard Gomez wrote:
> > > - declare extern functions that are meant to be extern
> > What would we gain by doing this? Doesn't all compilers default to
> > extern for function prototypes?
> They should be. But for some reason that i ignore, sparse authors think
> that it's clearer to explicitly mark prototypes as extern when it's that
It's somewhat clearer - and it forces the programmer to think a bit,
which is good.
> > > - variables shadowing
> > Should be fixed for clarity...
> Yup standard allows that, the var scope is supposed to solve any
> ambiguity, but still human mind is not a compiler :-)
The reverse is also true. The compiler is definitely no human! At least
it doesn't get my implied declarations and good intentions :-)
Patch applied in trunk revision 1013. Thanks.
More information about the Rawstudio-dev