Some windows build errors

reviewable/pr12692/r4
Yash Tibrewal 7 years ago
parent e2ae17221e
commit 922bc8ae84
  1. 4
      src/core/lib/support/log_windows.cc
  2. 2
      src/core/lib/support/string_windows.cc
  3. 2
      src/core/lib/support/subprocess_windows.cc
  4. 2
      src/core/lib/support/sync_windows.cc

@ -47,7 +47,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
} else { } else {
/* Allocate a new buffer, with space for the NUL terminator. */ /* Allocate a new buffer, with space for the NUL terminator. */
size_t strp_buflen = (size_t)ret + 1; size_t strp_buflen = (size_t)ret + 1;
message = gpr_malloc(strp_buflen); message = (char *)gpr_malloc(strp_buflen);
/* Print to the buffer. */ /* Print to the buffer. */
va_start(args, format); va_start(args, format);
@ -66,7 +66,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
/* Simple starter implementation */ /* Simple starter implementation */
extern "C" void gpr_default_log(gpr_log_func_args *args) { extern "C" void gpr_default_log(gpr_log_func_args *args) {
char *final_slash; const char *final_slash;
const char *display_file; const char *display_file;
char time_buffer[64]; char time_buffer[64];
time_t timer; time_t timer;

@ -47,7 +47,7 @@ int gpr_asprintf(char **strp, const char *format, ...) {
/* Allocate a new buffer, with space for the NUL terminator. */ /* Allocate a new buffer, with space for the NUL terminator. */
strp_buflen = (size_t)ret + 1; strp_buflen = (size_t)ret + 1;
if ((*strp = gpr_malloc(strp_buflen)) == NULL) { if ((*strp = (char *)gpr_malloc(strp_buflen)) == NULL) {
/* This shouldn't happen, because gpr_malloc() calls abort(). */ /* This shouldn't happen, because gpr_malloc() calls abort(). */
return -1; return -1;
} }

@ -61,7 +61,7 @@ gpr_subprocess *gpr_subprocess_create(int argc, const char **argv) {
} }
gpr_free(args_tchar); gpr_free(args_tchar);
r = gpr_malloc(sizeof(gpr_subprocess)); r = (gpr_subprocess *)gpr_malloc(sizeof(gpr_subprocess));
memset(r, 0, sizeof(*r)); memset(r, 0, sizeof(*r));
r->pi = pi; r->pi = pi;
return r; return r;

@ -104,7 +104,7 @@ struct run_once_func_arg {
void (*init_function)(void); void (*init_function)(void);
}; };
static BOOL CALLBACK run_once_func(gpr_once *once, void *v, void **pv) { static BOOL CALLBACK run_once_func(gpr_once *once, void *v, void **pv) {
struct run_once_func_arg *arg = v; struct run_once_func_arg *arg = (struct run_once_func_arg *)v;
(*arg->init_function)(); (*arg->init_function)();
return 1; return 1;
} }

Loading…
Cancel
Save