Subject: Re: more fallout from unused changes (why at all?)
To: None <current-users@netbsd.org>
From: Christian Biere <christianbiere@gmx.de>
List: current-users
Date: 10/14/2006 20:12:33
Martin S. Weber wrote:
> I'm a bit confused about the "why -Wunused". To me, enabling this warning
> gives you a hint about obvious oversights, removing not used variables, saving
> a bit of space.

It might be useful for that too but I think the primary idea is to find
variables and parameters that are not used because these might be bugs, for
example, caused by copy & pasting code or accidently submitting unfinished
code. With a lot #ifdef in the code or callback functions that have fixed
prototypes you will, of course, get a lot of false-positives.

If find the pedantic GCC warnings very useful but if you enable them for
existing code rather than using them from the beginning, the amount of 
false-positives can be overwhelming. Also if there are many developers
with very diverse experience some of them might be suppressing useful
warnings inappropriately or just in a way that is bad for maintenance.

-- 
Christian