aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/metadata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/transport/metadata.c')
-rw-r--r--src/core/transport/metadata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/transport/metadata.c b/src/core/transport/metadata.c
index 9b07b980b7..9d135f4356 100644
--- a/src/core/transport/metadata.c
+++ b/src/core/transport/metadata.c
@@ -334,7 +334,7 @@ grpc_mdstr *grpc_mdstr_from_string(grpc_mdctx *ctx, const char *str,
grpc_mdstr *ret;
for (i = 0; i < len; i++) {
if (str[i] >= 'A' && str[i] <= 'Z') {
- copy[i] = str[i] - 'A' + 'a';
+ copy[i] = (char)(str[i] - 'A' + 'a');
} else {
copy[i] = str[i];
}
@@ -379,7 +379,7 @@ grpc_mdstr *grpc_mdstr_from_buffer(grpc_mdctx *ctx, const gpr_uint8 *buf,
s->slice.refcount = NULL;
memcpy(s->slice.data.inlined.bytes, buf, length);
s->slice.data.inlined.bytes[length] = 0;
- s->slice.data.inlined.length = length;
+ s->slice.data.inlined.length = (gpr_uint8)length;
} else {
/* string data goes after the internal_string header, and we +1 for null
terminator */