aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c
diff options
context:
space:
mode:
Diffstat (limited to 'src/objective-c')
-rw-r--r--src/objective-c/ProtoRPC/ProtoService.m9
-rw-r--r--src/objective-c/tests/GRPCClientTests.m24
-rw-r--r--src/objective-c/tests/Podfile3
3 files changed, 17 insertions, 19 deletions
diff --git a/src/objective-c/ProtoRPC/ProtoService.m b/src/objective-c/ProtoRPC/ProtoService.m
index cd9bc7aeac..9740190851 100644
--- a/src/objective-c/ProtoRPC/ProtoService.m
+++ b/src/objective-c/ProtoRPC/ProtoService.m
@@ -65,22 +65,19 @@
return self;
}
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
- (ProtoRPC *)RPCToMethod:(NSString *)method
requestsWriter:(GRXWriter *)requestsWriter
responseClass:(Class)responseClass
responsesWriteable:(id<GRXWriteable>)responsesWriteable {
- ProtoMethod *methodName = [[ProtoMethod alloc] initWithPackage:_packageName
- service:_serviceName
- method:method];
+ GRPCProtoMethod *methodName = [[GRPCProtoMethod alloc] initWithPackage:_packageName
+ service:_serviceName
+ method:method];
return [[ProtoRPC alloc] initWithHost:_host
method:methodName
requestsWriter:requestsWriter
responseClass:responseClass
responsesWriteable:responsesWriteable];
}
-#pragma clang diagnostic pop
@end
@implementation GRPCProtoService
diff --git a/src/objective-c/tests/GRPCClientTests.m b/src/objective-c/tests/GRPCClientTests.m
index 2eca7bf549..1167a715bb 100644
--- a/src/objective-c/tests/GRPCClientTests.m
+++ b/src/objective-c/tests/GRPCClientTests.m
@@ -110,14 +110,14 @@ static GRPCProtoMethod *kUnaryCallMethod;
// This method isn't implemented by the remote server.
kInexistentMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage
- service:kService
- method:@"Inexistent"];
+ service:kService
+ method:@"Inexistent"];
kEmptyCallMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage
- service:kService
- method:@"EmptyCall"];
+ service:kService
+ method:@"EmptyCall"];
kUnaryCallMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage
- service:kService
- method:@"UnaryCall"];
+ service:kService
+ method:@"UnaryCall"];
}
- (void)testConnectionToRemoteServer {
@@ -303,9 +303,9 @@ static GRPCProtoMethod *kUnaryCallMethod;
// Try to set parameters to nil for GRPCCall. This should cause an exception
@try {
- GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:nil
- path:nil
- requestsWriter:nil];
+ (void)[[GRPCCall alloc] initWithHost:nil
+ path:nil
+ requestsWriter:nil];
XCTFail(@"Did not receive an exception when parameters are nil");
} @catch(NSException *theException) {
NSLog(@"Received exception as expected: %@", theException.name);
@@ -316,9 +316,9 @@ static GRPCProtoMethod *kUnaryCallMethod;
GRXWriter *requestsWriter = [GRXWriter emptyWriter];
[requestsWriter finishWithError:nil];
@try {
- GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:kHostAddress
- path:kUnaryCallMethod.HTTPPath
- requestsWriter:requestsWriter];
+ (void)[[GRPCCall alloc] initWithHost:kHostAddress
+ path:kUnaryCallMethod.HTTPPath
+ requestsWriter:requestsWriter];
XCTFail(@"Did not receive an exception when GRXWriter has incorrect state.");
} @catch(NSException *theException) {
NSLog(@"Received exception as expected: %@", theException.name);
diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile
index d51b18cc34..6d5f94cbda 100644
--- a/src/objective-c/tests/Podfile
+++ b/src/objective-c/tests/Podfile
@@ -6,7 +6,7 @@ install! 'cocoapods', :deterministic_uuids => false
def shared_pods
pod 'Protobuf', :path => "../../../third_party/protobuf", :inhibit_warnings => true
pod 'BoringSSL', :podspec => "..", :inhibit_warnings => true
- pod 'CronetFramework', :podspec => "..", :inhibit_warnings => true
+ pod 'CronetFramework', :podspec => ".."
pod 'gRPC', :path => "../../.."
pod 'RemoteTest', :path => "RemoteTestClient"
end
@@ -42,6 +42,7 @@ post_install do |installer|
end
if target.name == 'gRPC'
target.build_configurations.each do |config|
+ # TODO(zyc) Remove this setting after the issue is resolved
# GPR_UNREACHABLE_CODE causes "Control may reach end of non-void
# function" warning
config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO'