From 4a91bf47d074a54d4405ba48d8799d458883ee82 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 22 Sep 2017 12:05:25 -0700 Subject: Fixing build.yaml. More pointer conversions and changes required by other builds --- src/core/lib/support/env_windows.cc | 2 +- src/core/lib/support/log_posix.cc | 2 +- src/core/lib/surface/call.cc | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/support/env_windows.cc b/src/core/lib/support/env_windows.cc index 652eeb61c6..73c643c560 100644 --- a/src/core/lib/support/env_windows.cc +++ b/src/core/lib/support/env_windows.cc @@ -45,7 +45,7 @@ char *gpr_getenv(const char *name) { ret = GetEnvironmentVariable(tname, NULL, 0); if (ret == 0) return NULL; size = ret * (DWORD)sizeof(TCHAR); - tresult = gpr_malloc(size); + tresult = (LPTSTR)gpr_malloc(size); ret = GetEnvironmentVariable(tname, tresult, size); gpr_free(tname); if (ret == 0) { diff --git a/src/core/lib/support/log_posix.cc b/src/core/lib/support/log_posix.cc index 855e8e7107..38a136e646 100644 --- a/src/core/lib/support/log_posix.cc +++ b/src/core/lib/support/log_posix.cc @@ -48,7 +48,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, } else if ((size_t)ret <= sizeof(buf) - 1) { message = buf; } else { - message = allocated = gpr_malloc((size_t)ret + 1); + message = allocated = (char *)gpr_malloc((size_t)ret + 1); va_start(args, format); vsnprintf(message, (size_t)(ret + 1), format, args); va_end(args); diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 74e55d5741..173e800f0d 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -95,9 +95,12 @@ static gpr_atm pack_received_status(received_status r) { static received_status unpack_received_status(gpr_atm atm) { return (atm & 1) == 0 - ? (received_status){.is_set = false, .error = GRPC_ERROR_NONE} - : (received_status){.is_set = true, - .error = (grpc_error *)(atm & ~(gpr_atm)1)}; + ? (received_status){false, /* is_set */ + GRPC_ERROR_NONE /*error */ + } + : (received_status){true, /* is_set */ + (grpc_error *)(atm & ~(gpr_atm)1) /* error */ + }; } #define MAX_ERRORS_PER_BATCH 4 -- cgit v1.2.3