在使用到JSONKit框架的时候警告:Bit masking for introspection of Objective-C object pointer is strongly discouraged,虽然不影响使用,但还是希望没有警告。
网上找到两种解决方案
方案一:
<span style="font-size:18px;"> #pragma clang diagnostic push
#pragma clang diagnostic ignored"-Wdeprecated-objc-pointer-introspection"
BOOL workAroundMacOSXABIBreakingBug = (JK_EXPECT_F(((NSUInteger)object) &0x1)) ? YES : NO;
#pragma clang diagnostic pop</span>
代替
<span style="font-size:18px;"> BOOL workAroundMacOSXABIBreakingBug = (JK_EXPECT_F(((NSUInteger)object) &0x1)) ? YES : NO;</span>
用 JK_EXPECT_F(((NSUInteger)object)%2) 替换 JK_EXPECT_F(((NSUInteger)object) &0x1)
资料来源于:http://blog.sina.com.cn/s/blog_8aecea5f0102uxec.html