Subject: Re: more fallout from unused changes (why at all?)
To: None <firstname.lastname@example.org>
From: Christian Biere <email@example.com>
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.