Techniques to suppress "unused member variable" Clang warnings?
Techniques to suppress "unused member variable" Clang warnings?
- Subject: Techniques to suppress "unused member variable" Clang warnings?
- From: James Bucanek <email@hidden>
- Date: Thu, 3 Feb 2011 15:46:36 -0700
Greetings,
I'm dusting off a couple of large projects, cleaning warnings,
and running the static analyzer on them.
There are a few erroneous warnings that Clang can't seem to deal
with. I have one that occurs again and again, and I'd like to
suppress them but can't figure out how.
"Instance variable 'someVariable' in class 'SomeClass' is
never used by the
methods in its @implementation (although it may be used by
category methods)"
And that's exactly the case. I have numerous instance variables
which are only used by categories.
This is most common warning that I can't get rid of. In other
places where Clang can't make sense of things, I can comment out
the code with #if __clang_analyzer__ / #endif, so the code isn't
seen by the analyzer. But in this case, commenting out these
variables just creates a bunch of undefined variable errors. And
the GCC #pragma unused() doesn't apply to instance variables.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden