-Wincompatible-pointer-types //忽略不兼容指针类型警告 -Warc-retain-cycles //忽略循环引用警告 -Wunused-variable //忽略未使用变量警告 遇到别的 warning 解决办法:点击警告信息,右键选择Reveal In Log, 就可以看到警告的详细信息,中括号中的 -Wdeprecated-declarations便是我们想要得到的信息了...
#pragma clang diagnostic ignored "-Wincompatible-pointer-types" self.aidParams = self.ridParams = self.ICParams = nil; #pragma clang diagnostic pop 要想去除其它的警告类型,需要将上面的"-Wincompatible-pointer-types"改为对应的类型即可 #pragma clang diagnostic ignored "-Wunused-variable"未使用的变量...
either make it transient or static. Making it static final is preferred option due to many reason because if you make it transient than after deserialization logger instance will be null and any logger.debug() call will result in NullPointerException in Java because ...
-Wincompatible-pointer-types 循环引用警告 -Warc-retain-cycles 未使用变量警告 -Wunused-variable 未使用default警告 -Wcovered-switch-default selector中方法名不存在警告 -Wundeclared-selector 代码永远不会执行警告 -Wunreachable-code 终极大招:去除所有警告 -Weverything 另:在Build Settings中搜索Other Warning ...
#pragma clang diagnostic ignored "-Wunused-variable"未使用的变量 #pragma clang diagnostic ignored "-Warc-retain-cycles"retain cycle #pragma clang diagnostic ignored "-Wdeprecated-declarations"方法弃用警告 #pragma clang diagnostic ignored "-Wincompatible-pointer-types"不兼容的指针类型...
3.#pragma clang diagnostic ignored "-Wformat" 字符串格式化警告 4.#pragma clang diagnostic ignored "-Wdeprecated-declarations" 方法弃用告警 5.#pragma clang diagnostic ignored "-Wincompatible-pointer-types" 不兼容指针类型 6.#pragma clang diagnostic ignored "-Warc-retain-cycles" retain cycle...
#pragmaclang diagnostic ignored "-Wincompatible-pointer-types" 方法弱引用 比如performSelector 方法 #pragmaclang diagnostic ignored "-Warc-performSelector-leaks" 补充 还有很多,点击跳转-> 最后一定要注意注意在注意 注意:最好不用用这个方法来把所有的警告都这样忽视了,因为很多警告真的是警告。
-Wincompatible-pointer-types 循环引用警告 -Warc-retain-cycles 未使用变量警告 -Wunused-variable 未使用default警告 -Wcovered-switch-default selector中方法名不存在警告 -Wundeclared-selector 代码永远不会执行警告 -Wunreachable-code 终极大招:去除所有警告 ...