aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support/cmdline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/support/cmdline.c')
-rw-r--r--src/core/support/cmdline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/support/cmdline.c b/src/core/support/cmdline.c
index 4baad85040..45a3182f73 100644
--- a/src/core/support/cmdline.c
+++ b/src/core/support/cmdline.c
@@ -228,7 +228,7 @@ static void value_state(gpr_cmdline *cl, char *arg) {
cl->cur_arg->name);
print_usage_and_die(cl);
}
- *(int *)cl->cur_arg->value = intval;
+ *(int *)cl->cur_arg->value = (int)intval;
break;
case ARGTYPE_BOOL:
if (0 == strcmp(arg, "1") || 0 == strcmp(arg, "true")) {
@@ -287,8 +287,8 @@ static void normal_state(gpr_cmdline *cl, char *arg) {
eq = strchr(arg, '=');
if (eq != NULL) {
/* copy the string into a temp buffer and extract the name */
- tmp = arg_name = gpr_malloc(eq - arg + 1);
- memcpy(arg_name, arg, eq - arg);
+ tmp = arg_name = gpr_malloc((size_t)(eq - arg + 1));
+ memcpy(arg_name, arg, (size_t)(eq - arg));
arg_name[eq - arg] = 0;
} else {
arg_name = arg;