Skip navigation.
 
mlRe: NSAssert and Unused Variable
FROM : Richard Somers
DATE : Thu Apr 03 21:42:01 2008

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

Related mailsAuthorDate
mlNSAssert and Unused Variable Richard Somers Apr 3, 02:03
mlRe: NSAssert and Unused Variable John Newlin Apr 3, 02:16
mlRe: NSAssert and Unused Variable Jens Alfke Apr 3, 02:30
mlRe: NSAssert and Unused Variable Chris Suter Apr 3, 03:34
mlRe: NSAssert and Unused Variable Richard Somers Apr 3, 21:42