I understand what the warning says. This is exactly how scoping rules work. I appreciate that some people want a nanny. I don’t. How can I disable this warning?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The warning name you’re looking for is “shadow-ivar”. It appears in the log in Xcode 4.3 as something like
warning: local declaration of 'foo' hides instance variable [-Wshadow-ivar].I still don’t see it in the project’s Build Settings list, but
#pragma clang diagnostic ignored "-Wshadow-ivar"will take care of it in one file at a time. I actually like to turn it off for particular functions and then turn it on again. That way it ceases to nag me where I’ve decided I don’t care but will warn me again in new code.