随時追加
ios6とかでdepricated
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
BOOL available = [TWTweetComposeViewController canSendTweet];
# pragma clang diagnostic pop
Category is implementing a method which will also be implemented by its primary class
カテゴリの実装でメソッドをオーバーライドするなという警告
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
- (void)addRoundedRectToPath:(CGRect)rect
context:(CGContextRef)context
ovalWidth:(CGFloat)ovalWidth
ovalHeight:(CGFloat)ovalHeight
{
.....
}
# pragma clang diagnostic pop
PerformSelector may cause a leak because its selector is unknown
ARC環境下でのワーニング。-performSelector:からの返り値をコントロールできなくて出る。
SEL sel = @selector(doSomething);
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Warc-performSelector-leaks"
[obj performSelector:sel];
# pragma clang diagnostic pop
Unused parameter '****'
パラメータを使えーって言っていますので変数名の頭に__attribute__((unused))を追加。
[hoge performRequestWithHandler:^(NSData *responseData, __attribute__((unused)) NSHTTPURLResponse *urlResponse, NSError *error) {
completion(responseData, error);
}];