• 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: NSAssert and Unused Variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAssert and Unused Variable


  • Subject: Re: NSAssert and Unused Variable
  • From: Richard Somers <email@hidden>
  • Date: Thu, 3 Apr 2008 13:42:01 -0600


On Apr 2, 2008, at 7:34PM, Chris Suter wrote:

int var __attribute__((__unused__));

Or use the following short cut found in cdefs.h.

    #define __unused __attribute__((__unused__))

Which would make my example look like this which seems to work well.

    int __unused error = foo();
    NSAssert(error == 0, @"We have an assertion failure!");

Thanks to everyone for their comments. I learned something.

Regards, Richard

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >NSAssert and Unused Variable (From: Richard Somers <email@hidden>)
 >Re: NSAssert and Unused Variable (From: Jens Alfke <email@hidden>)
 >Re: NSAssert and Unused Variable (From: Chris Suter <email@hidden>)

  • Prev by Date: Re: -[CALayer setContents: cvPixelBufferRef ] ?
  • Next by Date: Re: -[CALayer setContents: cvPixelBufferRef ] ?
  • Previous by thread: Re: NSAssert and Unused Variable
  • Next by thread: About the Primary Button problems in Cocoa Mouse Event Handling
  • Index(es):
    • Date
    • Thread