fix -Wmemset-elt-size warning in gcc7.2

pull/14136/head
Jan Tattermusch 7 years ago
parent 4c3496c234
commit 2094ad7427
  1. 8
      test/core/surface/byte_buffer_reader_test.cc

@ -202,8 +202,8 @@ static void test_readall(void) {
LOG_TEST("test_readall"); LOG_TEST("test_readall");
memset(lotsa_as, 'a', 512); memset(lotsa_as, 'a', 512 * sizeof(lotsa_as[0]));
memset(lotsa_bs, 'b', 1024); memset(lotsa_bs, 'b', 1024 * sizeof(lotsa_bs[0]));
/* use slices large enough to overflow inlining */ /* use slices large enough to overflow inlining */
slices[0] = grpc_slice_malloc(512); slices[0] = grpc_slice_malloc(512);
memcpy(GRPC_SLICE_START_PTR(slices[0]), lotsa_as, 512); memcpy(GRPC_SLICE_START_PTR(slices[0]), lotsa_as, 512);
@ -237,8 +237,8 @@ static void test_byte_buffer_copy(void) {
LOG_TEST("test_byte_buffer_copy"); LOG_TEST("test_byte_buffer_copy");
memset(lotsa_as, 'a', 512); memset(lotsa_as, 'a', 512 * sizeof(lotsa_as[0]));
memset(lotsa_bs, 'b', 1024); memset(lotsa_bs, 'b', 1024 * sizeof(lotsa_bs[0]));
/* use slices large enough to overflow inlining */ /* use slices large enough to overflow inlining */
slices[0] = grpc_slice_malloc(512); slices[0] = grpc_slice_malloc(512);
memcpy(GRPC_SLICE_START_PTR(slices[0]), lotsa_as, 512); memcpy(GRPC_SLICE_START_PTR(slices[0]), lotsa_as, 512);

Loading…
Cancel
Save