Using the GCC __unused attribute with Objective-C

前端 未结 5 1512
野的像风
野的像风 2021-01-04 04:31

Is it possible to use the __unused attribute macro on Objective-C object method parameters? I\'ve tried placing it in various positions around the parameter declaration but

5条回答
  •  暖寄归人
    2021-01-04 05:15

    After fighting with the #pragma for a while, I discovered it's

    + (NSString*) runQuery:(id)query name:(NSString*)name options:(NSDictionary*)options
    {
    #pragma unused(name)
     ...
    
    }
    

提交回复
热议问题