aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/channel
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/channel
parent2ed498151da3b68107312b6397dbff4b4f60e475 (diff)
Enable -Wconversion
Diffstat (limited to 'src/core/channel')
-rw-r--r--src/core/channel/compress_filter.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/channel/compress_filter.c b/src/core/channel/compress_filter.c
index 8e06094257..c47b91bc58 100644
--- a/src/core/channel/compress_filter.c
+++ b/src/core/channel/compress_filter.c
@@ -230,7 +230,10 @@ static void process_send_ops(grpc_call_element *elem,
GPR_ASSERT(calld->remaining_slice_bytes > 0);
/* Increase input ref count, gpr_slice_buffer_add takes ownership. */
gpr_slice_buffer_add(&calld->slices, gpr_slice_ref(sop->data.slice));
- calld->remaining_slice_bytes -= GPR_SLICE_LENGTH(sop->data.slice);
+ GPR_ASSERT(GPR_SLICE_LENGTH(sop->data.slice) >
+ calld->remaining_slice_bytes);
+ calld->remaining_slice_bytes -=
+ (gpr_uint32)GPR_SLICE_LENGTH(sop->data.slice);
if (calld->remaining_slice_bytes == 0) {
did_compress =
compress_send_sb(calld->compression_algorithm, &calld->slices);