diff options
author | Julien Boeuf <jboeuf@google.com> | 2015-09-15 15:20:26 -0700 |
---|---|---|
committer | Julien Boeuf <jboeuf@google.com> | 2015-09-15 15:20:26 -0700 |
commit | fd2f7331fa97f735879a8759ac9fc8591969011b (patch) | |
tree | da031f982ee5d1d21fd71e6c4bc9d80365c7d6e2 /src/core/transport/metadata.c | |
parent | 1928d496a237c3850365e2557ae41ae73125fc80 (diff) | |
parent | 9ed4be48955e3b65b0540f70060b7191d8c1eef1 (diff) |
Merge branch 'master' of github.com:grpc/grpc into core_creds_plugin
Diffstat (limited to 'src/core/transport/metadata.c')
-rw-r--r-- | src/core/transport/metadata.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/transport/metadata.c b/src/core/transport/metadata.c index 61638764a6..9d135f4356 100644 --- a/src/core/transport/metadata.c +++ b/src/core/transport/metadata.c @@ -186,7 +186,8 @@ grpc_mdctx *grpc_mdctx_create(void) { /* This seed is used to prevent remote connections from controlling hash table * collisions. It needs to be somewhat unpredictable to a remote connection. */ - return grpc_mdctx_create_with_seed(gpr_now(GPR_CLOCK_REALTIME).tv_nsec); + return grpc_mdctx_create_with_seed( + (gpr_uint32)gpr_now(GPR_CLOCK_REALTIME).tv_nsec); } static void discard_metadata(grpc_mdctx *ctx) { @@ -333,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]; } @@ -378,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 */ |