At 14:23 16-4-2012 +0200, Byrial Jensen wrote:
"-Wno-parentheses" means that warnings suggesting parentheses which were
otherwise enabled by -Wall are turned off. So what Arun suggested was to
enable the suite of warnings enabled by -Wall except for warnings about
parentheses.
Generally -Wno-somethning will turn off warnings of type -Wsomething.
Oh sorry, then I misunderstood that completely. I thought the warning would
warn if there were no parentheses.
I am absolutely fine with the other warnings. Although I sometimes
encounter an annoying one about library functions declared with
'warn-unused-result' (or something like that). If I am not interested in
the result, I don't think the code would improve very much by fooling it
into thinking I am. And not being interested in the result is often a sign
of laziness or it not being clear beforehand how to solve possible error
conditions. In that case patching it up by casting to (void) or some other
trick only serves to hide permananetly what could be a genuine problem, so
that you now know for sure it will be never fixed.
So I am all for deleting unused variables, whose presence is an errror or
legacy of now rewritten code. Deleting unused functions IMO is already of
more doubtful use, if the finctions are part of a generally useful
infra-structure. But silencing errors that have a vague ring of truth to
them by a meaningless trick is probably something that is better to refrain
from.