Re: Clang analysis: Debug variables "never read."
Re: Clang analysis: Debug variables "never read."
- Subject: Re: Clang analysis: Debug variables "never read."
- From: Rick Mann <email@hidden>
- Date: Fri, 2 Oct 2009 10:06:24 -0700
Sorry, I meant "errCode" when I said "localStuff".
On Oct 2, 2009, at 09:57:48, Fritz Anderson wrote:
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
_______________________________________________
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