Addressed review comments

Removed the silencing for incompatible-pointer-types
Removed unused objects
Fixed format issues
pull/6922/head
Yuchen Zeng 9 years ago
parent aa338326ed
commit d5fd7ddc70
  1. 5
      src/objective-c/ProtoRPC/ProtoService.m
  2. 4
      src/objective-c/tests/GRPCClientTests.m
  3. 3
      src/objective-c/tests/Podfile

@ -65,13 +65,11 @@
return self; return self;
} }
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
- (ProtoRPC *)RPCToMethod:(NSString *)method - (ProtoRPC *)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 [[ProtoRPC alloc] initWithHost:_host
@ -80,7 +78,6 @@
responseClass:responseClass responseClass:responseClass
responsesWriteable:responsesWriteable]; responsesWriteable:responsesWriteable];
} }
#pragma clang diagnostic pop
@end @end
@implementation GRPCProtoService @implementation GRPCProtoService

@ -303,7 +303,7 @@ static GRPCProtoMethod *kUnaryCallMethod;
// Try to set parameters to nil for GRPCCall. This should cause an exception // Try to set parameters to nil for GRPCCall. This should cause an exception
@try { @try {
GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:nil (void)[[GRPCCall alloc] initWithHost:nil
path:nil path:nil
requestsWriter:nil]; requestsWriter:nil];
XCTFail(@"Did not receive an exception when parameters are nil"); XCTFail(@"Did not receive an exception when parameters are nil");
@ -316,7 +316,7 @@ static GRPCProtoMethod *kUnaryCallMethod;
GRXWriter *requestsWriter = [GRXWriter emptyWriter]; GRXWriter *requestsWriter = [GRXWriter emptyWriter];
[requestsWriter finishWithError:nil]; [requestsWriter finishWithError:nil];
@try { @try {
GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:kHostAddress (void)[[GRPCCall alloc] initWithHost:kHostAddress
path:kUnaryCallMethod.HTTPPath path:kUnaryCallMethod.HTTPPath
requestsWriter:requestsWriter]; requestsWriter:requestsWriter];
XCTFail(@"Did not receive an exception when GRXWriter has incorrect state."); XCTFail(@"Did not receive an exception when GRXWriter has incorrect state.");

@ -6,7 +6,7 @@ install! 'cocoapods', :deterministic_uuids => false
def shared_pods def shared_pods
pod 'Protobuf', :path => "../../../third_party/protobuf", :inhibit_warnings => true pod 'Protobuf', :path => "../../../third_party/protobuf", :inhibit_warnings => true
pod 'BoringSSL', :podspec => "..", :inhibit_warnings => true pod 'BoringSSL', :podspec => "..", :inhibit_warnings => true
pod 'CronetFramework', :podspec => "..", :inhibit_warnings => true pod 'CronetFramework', :podspec => ".."
pod 'gRPC', :path => "../../.." pod 'gRPC', :path => "../../.."
pod 'RemoteTest', :path => "RemoteTestClient" pod 'RemoteTest', :path => "RemoteTestClient"
end end
@ -42,6 +42,7 @@ post_install do |installer|
end end
if target.name == 'gRPC' if target.name == 'gRPC'
target.build_configurations.each do |config| 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 # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void
# function" warning # function" warning
config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO' config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO'

Loading…
Cancel
Save