On 03/04/2008, at 11:30 AM, Jens Alfke wrote:

I seem to recall a pragma or macro that can be used to tell the compiler "I know this variable is unused, don't complain about it", though I don't remember the details...

Apple gcc only:

#pragma unused (var)

or

_Pragma("unused(var)")

The implementation of that pragma has some bugs in it that will cause gcc to crash or hang in certain circumstances that I really should report.

or you can do:

(void)var;

or  you can use the unused attribute e.g.:

void my_func (int a, int b __attribute__((__unused__)))

or

int var __attribute__((__unused__));

Unfortunately, there's no way that I know of to apply that attribute to Objective-C method parameters.

- Chris

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to