Re: -Wall
Re: -Wall
- Subject: Re: -Wall
- From: Alex Curylo <email@hidden>
- Date: Wed, 4 Jun 2008 18:53:29 -0700
On 4-Jun-08, at 5:47 PM, email@hidden wrote:
Is there some other way I can inform the compiler
(and a future maintainer) that the parameter is intentionally not
used?
Option A) which I use since it works with compilers from that other,
lesser, platform most people write code for:
- (void)emptyMethod:(NSNotification*)notification
{
(void)notification;
}
Option B) when you can assume the requirement of compilers which do
not suck:
- (void)emptyMethod:(NSNotification*)notification
{
#pragma unused (notification)
}
In C/C++ you'd have the third option
void EmptyMethod(
NSNotification* // notification
)
{
}
but I don't believe there is an anonymous argument feature like that
in Objective-C since the type of an argument is not sufficient to
establish its signature, unlike C/C++. If I'm wrong, I'm sure somebody
more clueful will jump in and correct that.
--
Alex Curylo -- email@hidden -- http://www.alexcurylo.com/
"In heaven all the interesting people are missing."
-- Friedrich Nietzsche
_______________________________________________
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
- Follow-Ups:
- Re: -Wall
- From: Alastair Houghton <email@hidden>