diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-09-22 12:05:25 -0700 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-10-02 16:29:41 -0700 |
commit | 4a91bf47d074a54d4405ba48d8799d458883ee82 (patch) | |
tree | 667e812ebb374b63c33b6431dd45e695b4965614 /src/core/lib | |
parent | 19f0a909ac8d75fda477b4053cae1dd3a9f6c3d2 (diff) |
Fixing build.yaml. More pointer conversions and changes required by other builds
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/support/env_windows.cc | 2 | ||||
-rw-r--r-- | src/core/lib/support/log_posix.cc | 2 | ||||
-rw-r--r-- | src/core/lib/surface/call.cc | 9 |
3 files changed, 8 insertions, 5 deletions
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 |