Re: #pragma doesn't
Re: #pragma doesn't
- Subject: Re: #pragma doesn't
- From: James Bucanek <email@hidden>
- Date: Wed, 6 Jan 2010 09:07:27 -0700
Charlie Dickman <mailto:email@hidden> wrote (Wednesday,
December 23, 2009 6:21 PM -0500):
According to the documentation #pragma unused (iVar) is
supposed to suppress any unused variable warning for iVar but
it doesn't. Anybody know what gives?
I write #pragma unused() practically every day and it's never
failed to do its job. No one has given any example of where it
fails, so I'm still curious about the OP's predicament.
I always place my #pragma statements at the beginning of the
method block:
- (void)doSomething:(id)sender
{
#pragma unused(sender)
...
}
Works every time.
I've tried __unused and __attribute__... but find them difficult
to read and not as obvious. They are also more difficult to put
inside #if/#endif blocks in situations where the variable might
be used in one case and not used in another.
James Bucanek
____________________________________________________________________
Author of Beginning Xcode ISBN: 047175479X
<http://www.beginningxcode.com/>
_______________________________________________
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