aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/chttp2/varint.h
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-10 11:47:15 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-10 11:47:15 -0700
commit32ca48ce0b963949ff29d2dcd526b174679779aa (patch)
treee1203e29dbc0827fe4e9eed5737b3f1589d44f34 /src/core/transport/chttp2/varint.h
parentbe947697d7c5edb1f67c9df5ef024e3eaf98e9e6 (diff)
Core compiles with -Wsign-conversion
Diffstat (limited to 'src/core/transport/chttp2/varint.h')
-rw-r--r--src/core/transport/chttp2/varint.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/transport/chttp2/varint.h b/src/core/transport/chttp2/varint.h
index 0a6fb55248..37856913f8 100644
--- a/src/core/transport/chttp2/varint.h
+++ b/src/core/transport/chttp2/varint.h
@@ -41,10 +41,11 @@
/* length of a value that needs varint tail encoding (it's bigger than can be
bitpacked into the opcode byte) - returned value includes the length of the
opcode byte */
-int grpc_chttp2_hpack_varint_length(gpr_uint32 tail_value);
+gpr_uint32 grpc_chttp2_hpack_varint_length(gpr_uint32 tail_value);
void grpc_chttp2_hpack_write_varint_tail(gpr_uint32 tail_value,
- gpr_uint8* target, int tail_length);
+ gpr_uint8* target,
+ gpr_uint32 tail_length);
/* maximum value that can be bitpacked with the opcode if the opcode has a
prefix
@@ -54,14 +55,14 @@ void grpc_chttp2_hpack_write_varint_tail(gpr_uint32 tail_value,
/* length required to bitpack a value */
#define GRPC_CHTTP2_VARINT_LENGTH(n, prefix_bits) \
((n) < GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits) \
- ? 1 \
+ ? 1u \
: grpc_chttp2_hpack_varint_length( \
(n)-GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits)))
#define GRPC_CHTTP2_WRITE_VARINT(n, prefix_bits, prefix_or, target, length) \
do { \
gpr_uint8* tgt = target; \
- if ((length) == 1) { \
+ if ((length) == 1u) { \
(tgt)[0] = (prefix_or) | (n); \
} else { \
(tgt)[0] = (prefix_or) | GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits); \