Skip navigation.
 
mlRe: How do I disable this warning: "local declaration of 'varname' hides instance variable"
FROM : Daniel Jalkut
DATE : Mon Mar 24 06:11:58 2008

On Mar 24, 2008, at 1:04 AM, charlie wrote:
> This is why I didn't want to reveal **why** I want to suppress this 
> warning.  Because everyone feels compelled to pitch in their 2 cents 
> on this tangent subject which has already been explored and closed 
> on my end.
>
> I could care less what anyone else thinks about this decision.
>
> I simply want to know how to suppress the warning.


Look in your build settings. Turn off the "Hidden Local Variables" 
warning:

"Warn whenever a local variable shadows another local variable, 
parameter or global variable or whenever a built-in function is 
shadowed.  [GCC_WARN_SHADOW, -Wshadow]"

Unfortunately, it's harder to turn off the warnings of well-meaning 
developers who just want to save you from making a foolish move. You 
might thing twice, three, four, five times before persisting in being 
so indignant about this decision, especially as a variety of people 
start to chime in with the same message.

They're just trying to save you from doing something dumb. Your 
attitude in the past few messages makes it sound like you're much more 
concerned about this obsessive naming habit you've got than you are 
about the safety of your code. That, combined with the tone of your 
reaction makes it pretty unlikely that people will jump to help you 
out in the future.

And yes, when you ask for the help of a community, you take the advice 
you can get, even if it does include foreboding warnings about the 
wrongness of what you're trying to accomplish.

Warning: you might be doing something really dumb by turning off that 
warning. Enjoy!

Daniel