Fix gcc compilation

pull/4310/head
Craig Tiller 9 years ago
parent 11596c95c8
commit 5a640a4b7c
  1. 3
      src/core/transport/chttp2/varint.h
  2. 4
      test/core/transport/chttp2/varint_test.c

@ -50,7 +50,8 @@ void grpc_chttp2_hpack_write_varint_tail(gpr_uint32 tail_value,
/* maximum value that can be bitpacked with the opcode if the opcode has a
prefix
of length prefix_bits */
#define GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits) ((1 << (8 - (prefix_bits))) - 1)
#define GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits) \
((gpr_uint32)((1 << (8 - (prefix_bits))) - 1))
/* length required to bitpack a value */
#define GRPC_CHTTP2_VARINT_LENGTH(n, prefix_bits) \

@ -38,7 +38,9 @@
#include "test/core/util/test_config.h"
static void test_varint(gpr_uint32 value, int prefix_bits, gpr_uint8 prefix_or, const char *expect_bytes, size_t expect_length) {
static void test_varint(gpr_uint32 value, gpr_uint32 prefix_bits,
gpr_uint8 prefix_or, const char *expect_bytes,
size_t expect_length) {
gpr_uint32 nbytes = GRPC_CHTTP2_VARINT_LENGTH(value, prefix_bits);
gpr_slice expect = gpr_slice_from_copied_buffer(expect_bytes, expect_length);
gpr_slice slice;

Loading…
Cancel
Save