aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/chttp2/frame_settings.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-10 16:00:22 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-10 16:00:22 -0700
commit6a6b36c50300bcc33d761598591c4d1bd4f1f6aa (patch)
treefa6b9eeb5d9281258b42603465fab6fdbb101512 /src/core/transport/chttp2/frame_settings.c
parent2ed498151da3b68107312b6397dbff4b4f60e475 (diff)
Enable -Wconversion
Diffstat (limited to 'src/core/transport/chttp2/frame_settings.c')
-rw-r--r--src/core/transport/chttp2/frame_settings.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/transport/chttp2/frame_settings.c b/src/core/transport/chttp2/frame_settings.c
index f70776bf4c..54d3694a5c 100644
--- a/src/core/transport/chttp2/frame_settings.c
+++ b/src/core/transport/chttp2/frame_settings.c
@@ -61,9 +61,9 @@ const grpc_chttp2_setting_parameters
static gpr_uint8 *fill_header(gpr_uint8 *out, gpr_uint32 length,
gpr_uint8 flags) {
- *out++ = length >> 16;
- *out++ = length >> 8;
- *out++ = length;
+ *out++ = (gpr_uint8)(length >> 16);
+ *out++ = (gpr_uint8)(length >> 8);
+ *out++ = (gpr_uint8)(length);
*out++ = GRPC_CHTTP2_FRAME_SETTINGS;
*out++ = flags;
*out++ = 0;
@@ -90,12 +90,12 @@ gpr_slice grpc_chttp2_settings_create(gpr_uint32 *old, const gpr_uint32 *new,
for (i = 0; i < count; i++) {
if (new[i] != old[i] || (force_mask & (1u << i)) != 0) {
GPR_ASSERT(i);
- *p++ = i >> 8;
- *p++ = i;
- *p++ = new[i] >> 24;
- *p++ = new[i] >> 16;
- *p++ = new[i] >> 8;
- *p++ = new[i];
+ *p++ = (gpr_uint8)(i >> 8);
+ *p++ = (gpr_uint8)(i);
+ *p++ = (gpr_uint8)(new[i] >> 24);
+ *p++ = (gpr_uint8)(new[i] >> 16);
+ *p++ = (gpr_uint8)(new[i] >> 8);
+ *p++ = (gpr_uint8)(new[i]);
old[i] = new[i];
}
}
@@ -162,7 +162,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse(
}
return GRPC_CHTTP2_PARSE_OK;
}
- parser->id = ((gpr_uint16)*cur) << 8;
+ parser->id = (gpr_uint16)(((gpr_uint16)*cur) << 8);
cur++;
/* fallthrough */
case GRPC_CHTTP2_SPS_ID1:
@@ -170,7 +170,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse(
parser->state = GRPC_CHTTP2_SPS_ID1;
return GRPC_CHTTP2_PARSE_OK;
}
- parser->id |= (*cur);
+ parser->id = (gpr_uint16)(parser->id | (*cur));
cur++;
/* fallthrough */
case GRPC_CHTTP2_SPS_VAL0: