Clang analysis: Debug variables "never read."
Clang analysis: Debug variables "never read."
- Subject: Clang analysis: Debug variables "never read."
- From: Fritz Anderson <email@hidden>
- Date: Fri, 2 Oct 2009 11:57:48 -0500
I have a lot of code that assigns diagnostic information (error codes,
strings) to local variables for the sole purpose of making that
information visible in the debugger.
- (void) wrapSomethingComplicated
{
MyObject * localStuff;
// Lots of prep work going into localStuff
/// ...
int errorCode = [self doSomethingComplicated: localStuff];
[localStuff tearDown];
}
When I select Build > Build and Analyze in Xcode 3.2, the analyzer
issues lots of issues of the form "Value stored to 'errorCode' is
never read." This is correct, as far as it goes, but the non-use is
intentional.
Okay, in principle, I don't know that _all_ warnings flag
_intentional_ non-uses of a variable. So what's the best way for me to
mark up the intentional uses so they don't clutter the results?
— F
--
Fritz Anderson -- Xcode 3 Unleashed: Headed for its third printing -- <http://x3u.manoverboard.org/
>
_______________________________________________
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