|
|
Markus Becker <bec### [at] aicossde> wrote:
> Vadim Sytnikov wrote:
>>
>> For example, those unused function parameters you mention. For
>> decades, it's been a good C programming habit to write an extra
>> statement like this
>>
>> (void) my_unused_function_argument;
> Which will issue another warning like "code has no effect".
> Which I get. ;-)
> You can always get rid of all warnings. And I tend to try
> that (not always being succesfull). But I have a small system
> developed by me and my company which is well over 150000
> lines of code and issues exactly 4 (four) warning like the
> above.
And of the 300000 lines on the project I'm working on now (about 30-50% at a
rough guess, written by me), we generate *no* warnings at all, on three
*different* compilers, and without resorting to compiler ifdefs except with
regards to the libraries provided with the compilers themselves.
It both is possible and desireable to write code without warnings. The
patch I'm writing for POV regularly gets checked and fixed for such things.
Geoff
Post a reply to this message
|
|