xcode / clang - “clang diagnostics ignored”报告

时间:2018-03-05 02:31:40

标签: xcode clang diagnostics

为了清理我的代码,我有几个编译器警告,其中一个是-Wextra-semi意外报告;;在一行的末尾。但是,有些谷歌地图宏确实有;最后,他们最终得到了;;在末尾。为了克服这个问题,我想“让我们忽略它,它是第三方软件,我不负责”:

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wextra-semi"
#import <GoogleMaps/GoogleMaps.h>
#pragma clang diagnostic pop

但是,它仍然在构建时间日志中显示为警告:

While building module 'GoogleMaps' imported from /Users/edwin/dev/GC/Geocube/Geocube-Prefix.pch:43:
In file included from <module-includes>:1:
In file included from /Users/edwin/dev/GC/Pods/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/Headers/GoogleMaps.h:1:
/Users/edwin/dev/GC/Pods/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/Headers/GMSIndoorBuilding.h:14:24: warning: extra ';' outside of a function [-Wextra-semi]
NS_ASSUME_NONNULL_BEGIN;

这是因为模块包含部分吗?

编译器是Xcode 9.2。

0 个答案:

没有答案