Skip to content
Snippets Groups Projects
Commit 36a58a79 authored by Yuchen Zeng's avatar Yuchen Zeng
Browse files

Enable treating warnings as errors for target gRPC

parent dbe2b9e9
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
*/ */
+ (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCert + (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCert
forHost:(nonnull NSString *)host forHost:(nonnull NSString *)host
error:(NSError **)errorPtr; error:(NSError * _Nullable * _Nullable)errorPtr;
/** /**
* Configures @c host with TLS/SSL Client Credentials and optionally trusted root Certificate * Configures @c host with TLS/SSL Client Credentials and optionally trusted root Certificate
* Authorities. If @c pemRootCerts is nil, the default CA Certificates bundled with gRPC will be * Authorities. If @c pemRootCerts is nil, the default CA Certificates bundled with gRPC will be
...@@ -51,6 +51,6 @@ ...@@ -51,6 +51,6 @@
withPrivateKey:(nullable NSString *)pemPrivateKey withPrivateKey:(nullable NSString *)pemPrivateKey
withCertChain:(nullable NSString *)pemCertChain withCertChain:(nullable NSString *)pemCertChain
forHost:(nonnull NSString *)host forHost:(nonnull NSString *)host
error:(NSError **)errorPtr; error:(NSError * _Nullable * _Nullable)errorPtr;
@end @end
...@@ -54,6 +54,9 @@ __attribute__((deprecated("Please use GRPCProtoMethod."))) ...@@ -54,6 +54,9 @@ __attribute__((deprecated("Please use GRPCProtoMethod.")))
* This subclass is empty now. Eventually we'll remove ProtoMethod class * This subclass is empty now. Eventually we'll remove ProtoMethod class
* to avoid potential naming conflict * to avoid potential naming conflict
*/ */
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@interface GRPCProtoMethod : ProtoMethod @interface GRPCProtoMethod : ProtoMethod
#pragma clang diagnostic pop
@end @end
...@@ -56,6 +56,9 @@ __attribute__((deprecated("Please use GRPCProtoCall."))) ...@@ -56,6 +56,9 @@ __attribute__((deprecated("Please use GRPCProtoCall.")))
* This subclass is empty now. Eventually we'll remove ProtoRPC class * This subclass is empty now. Eventually we'll remove ProtoRPC class
* to avoid potential naming conflict * to avoid potential naming conflict
*/ */
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@interface GRPCProtoCall : ProtoRPC @interface GRPCProtoCall : ProtoRPC
#pragma clang diagnostic pop
@end @end
...@@ -55,6 +55,9 @@ __attribute__((deprecated("Please use GRPCProtoService."))) ...@@ -55,6 +55,9 @@ __attribute__((deprecated("Please use GRPCProtoService.")))
* This subclass is empty now. Eventually we'll remove ProtoService class * This subclass is empty now. Eventually we'll remove ProtoService class
* to avoid potential naming conflict * to avoid potential naming conflict
*/ */
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@interface GRPCProtoService : ProtoService @interface GRPCProtoService : ProtoService
#pragma clang diagnostic pop
@end @end
...@@ -65,14 +65,14 @@ ...@@ -65,14 +65,14 @@
return self; return self;
} }
- (ProtoRPC *)RPCToMethod:(NSString *)method - (GRPCProtoCall *)RPCToMethod:(NSString *)method
requestsWriter:(GRXWriter *)requestsWriter requestsWriter:(GRXWriter *)requestsWriter
responseClass:(Class)responseClass responseClass:(Class)responseClass
responsesWriteable:(id<GRXWriteable>)responsesWriteable { responsesWriteable:(id<GRXWriteable>)responsesWriteable {
ProtoMethod *methodName = [[ProtoMethod alloc] initWithPackage:_packageName GRPCProtoMethod *methodName = [[GRPCProtoMethod alloc] initWithPackage:_packageName
service:_serviceName service:_serviceName
method:method]; method:method];
return [[ProtoRPC alloc] initWithHost:_host return [[GRPCProtoCall alloc] initWithHost:_host
method:methodName method:methodName
requestsWriter:requestsWriter requestsWriter:requestsWriter
responseClass:responseClass responseClass:responseClass
... ...
......
source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0' platform :ios, '8.0'
pod 'Protobuf', :path => "../../../third_party/protobuf" pod 'Protobuf', :path => "../../../third_party/protobuf", :inhibit_warnings => true
pod 'BoringSSL', :podspec => ".." pod 'BoringSSL', :podspec => "..", :inhibit_warnings => true
pod 'CronetFramework', :podspec => ".." pod 'CronetFramework', :podspec => "..", :inhibit_warnings => true
pod 'gRPC', :path => "../../.." pod 'gRPC', :path => "../../.."
pod 'RemoteTest', :path => "RemoteTestClient" pod 'RemoteTest', :path => "RemoteTestClient"
...@@ -30,3 +30,18 @@ end ...@@ -30,3 +30,18 @@ end
target 'InteropTestsLocalCleartext' do target 'InteropTestsLocalCleartext' do
end end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES'
end
if target.name == 'gRPC'
target.build_configurations.each do |config|
# GPR_UNREACHABLE_CODE causes "Control may reach end of non-void
# function" warning
config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO'
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment