From 04a0395670322d5a7c08aafdf54b7a44ce9e78e3 Mon Sep 17 00:00:00 2001
From: murgatroid99 <mlumish@google.com>
Date: Fri, 19 Jun 2015 16:20:50 -0700
Subject: [PATCH] Added casts to a macro

---
 include/grpc/support/slice.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/grpc/support/slice.h b/include/grpc/support/slice.h
index 3ee103bfb9..19415865cf 100644
--- a/include/grpc/support/slice.h
+++ b/include/grpc/support/slice.h
@@ -97,8 +97,8 @@ typedef struct gpr_slice {
   ((slice).refcount ? (slice).data.refcounted.length \
                     : (slice).data.inlined.length)
 #define GPR_SLICE_SET_LENGTH(slice, newlen)                       \
-  ((slice).refcount ? ((slice).data.refcounted.length = (newlen)) \
-                    : ((slice).data.inlined.length = (newlen)))
+  ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \
+                    : ((slice).data.inlined.length = (gpr_uint8)(newlen)))
 #define GPR_SLICE_END_PTR(slice) \
   GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(slice)
 #define GPR_SLICE_IS_EMPTY(slice) (GPR_SLICE_LENGTH(slice) == 0)
-- 
GitLab