1.找警告

在工程中有警告的地方,右键选择Review in log在日志中查看 
消除警告
然后就能看到类似[-Wreceiver-expr]这样的警告 
消除警告
 

2.删除警告

2.1 如果是第三方库的警告,就选择对应第三方库的target,否则选择项目的target

2.2然后在工程buildSettings中的其他警告标志中添加-Wno-receiver-expr就可以去掉这种类似的警告了。 
消除警告
规则为:-Wno-类型

以下包含了90%的警告 
-Wno-receiver-expr  
-Wno-unguarded-availability  
-Wno-unknown-warning-option 
-Wno-strict-prototypes  
-Wno-implicit-retain-self  
-Wno-documentation 
-Wno-strict-prototypes  
-Wno-deprecated-implementations

 

转载于:https://my.oschina.net/u/3697347/blog/1836901

相关文章: