diff options
author | 2017-05-11 13:36:42 -0700 | |
---|---|---|
committer | 2017-05-11 13:36:42 -0700 | |
commit | 61f86d9bd795a65d94df72a47fbd313d9084d8e7 (patch) | |
tree | 7ffcbc1d894408ba391797581be166963b748d15 /src/core/lib/support/cmdline.c | |
parent | 45b89fb11ca3cd524787aeba7a1270f744a1256c (diff) |
C++ compatibility fixes
Diffstat (limited to 'src/core/lib/support/cmdline.c')
-rw-r--r-- | src/core/lib/support/cmdline.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lib/support/cmdline.c b/src/core/lib/support/cmdline.c index 88a65a8e2e..e5c9f3b84b 100644 --- a/src/core/lib/support/cmdline.c +++ b/src/core/lib/support/cmdline.c @@ -71,7 +71,7 @@ struct gpr_cmdline { static int normal_state(gpr_cmdline *cl, char *arg); gpr_cmdline *gpr_cmdline_create(const char *description) { - gpr_cmdline *cl = gpr_zalloc(sizeof(gpr_cmdline)); + gpr_cmdline *cl = (gpr_cmdline *)gpr_zalloc(sizeof(gpr_cmdline)); cl->description = description; cl->state = normal_state; @@ -100,7 +100,7 @@ static void add_arg(gpr_cmdline *cl, const char *name, const char *help, GPR_ASSERT(0 != strcmp(a->name, name)); } - a = gpr_zalloc(sizeof(arg)); + a = (arg *)gpr_zalloc(sizeof(arg)); a->name = name; a->help = help; a->type = type; @@ -302,7 +302,7 @@ static int normal_state(gpr_cmdline *cl, char *str) { eq = strchr(str, '='); if (eq != NULL) { /* copy the string into a temp buffer and extract the name */ - tmp = arg_name = gpr_malloc((size_t)(eq - str + 1)); + tmp = arg_name = (char *)gpr_malloc((size_t)(eq - str + 1)); memcpy(arg_name, str, (size_t)(eq - str)); arg_name[eq - str] = 0; } else { |