diff options
author | Muxi Yan <mxyan@google.com> | 2017-11-29 18:08:22 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2017-11-29 18:10:14 -0800 |
commit | 78683f700d6ad423b846fb2c6125cb9848ca1874 (patch) | |
tree | 36ae919b0ecc15fd8dfd824c04290592d894a329 | |
parent | 43db24953aa621dc0960b905cb186ed4eb3ccbe2 (diff) |
Fix ObjC++ build error
-rw-r--r-- | src/objective-c/tests/CronetUnitTests/CronetUnitTests.m | 8 | ||||
-rw-r--r-- | src/objective-c/tests/Tests.xcodeproj/project.pbxproj | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m b/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m index 0d295fb3c0..92bc20e5b9 100644 --- a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m +++ b/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m @@ -56,7 +56,7 @@ static void drain_cq(grpc_completion_queue *cq) { + (void)setUp { [super setUp]; - char *argv[] = {"CoreCronetEnd2EndTests"}; + char *argv[] = {(char *)"CoreCronetEnd2EndTests"}; grpc_test_init(1, argv); grpc_init(); @@ -100,7 +100,7 @@ void init_ctx(SSL_CTX *ctx) { // Install server certificate BIO *pem = BIO_new_mem_buf((void *)test_server1_cert, (int)strlen(test_server1_cert)); - X509 *cert = PEM_read_bio_X509_AUX(pem, NULL, NULL, ""); + X509 *cert = PEM_read_bio_X509_AUX(pem, NULL, NULL, (char *)""); SSL_CTX_use_certificate(ctx, cert); X509_free(cert); BIO_free(pem); @@ -108,7 +108,7 @@ void init_ctx(SSL_CTX *ctx) { // Install server private key pem = BIO_new_mem_buf((void *)test_server1_key, (int)strlen(test_server1_key)); - EVP_PKEY *key = PEM_read_bio_PrivateKey(pem, NULL, NULL, ""); + EVP_PKEY *key = PEM_read_bio_PrivateKey(pem, NULL, NULL, (char *)""); SSL_CTX_use_PrivateKey(ctx, key); EVP_PKEY_free(key); BIO_free(pem); @@ -258,7 +258,7 @@ unsigned int parse_h2_length(const char *field) { - (void)packetCoalescing:(BOOL)useCoalescing { grpc_arg arg; - arg.key = GRPC_ARG_USE_CRONET_PACKET_COALESCING; + arg.key = (char *)GRPC_ARG_USE_CRONET_PACKET_COALESCING; arg.type = GRPC_ARG_INTEGER; arg.value.integer = useCoalescing ? 1 : 0; grpc_channel_args *args = grpc_channel_args_copy_and_add(NULL, &arg, 1); diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index 52631b4dce..9a6cb0e7d7 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -1518,6 +1518,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = CronetUnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -1567,6 +1568,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = CronetUnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -1582,6 +1584,7 @@ buildSettings = { CLANG_ANALYZER_NONNULL = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = CronetUnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -1597,6 +1600,7 @@ buildSettings = { CLANG_ANALYZER_NONNULL = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = CronetUnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; |