• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Clang analysis: Debug variables "never read."
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Clang analysis: Debug variables "never read." (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Clang analysis: Debug variables "never read."
  • Next by Date: Re: Clang analysis: Debug variables "never read."
  • Previous by thread: Re: Clang analysis: Debug variables "never read."
  • Next by thread: Re: Clang analysis: Debug variables "never read."
  • Index(es):
    • Date
    • Thread