core: fix int conversion

build had failed with [-Werror=conversion] on gcc 7

```
src/core/ext/transport/cronet/transport/cronet_transport.c: In function ‘create_grpc_frame’:
src/core/ext/transport/cronet/transport/cronet_transport.c:693:10: error: conversion to ‘uint8_t {aka unsigned char}’ from ‘int’ may alter its value [-Werror=conversion]
   *p++ = (flags & GRPC_WRITE_INTERNAL_COMPRESS) ? 1 : 0;
          ^
```

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
pull/12653/head
Vincent Batts 7 years ago
parent ca46ce10b0
commit d149af0487
No known key found for this signature in database
GPG Key ID: 10937E57733F1362
  1. 2
      src/core/ext/transport/cronet/transport/cronet_transport.cc

@ -692,7 +692,7 @@ static void create_grpc_frame(grpc_exec_ctx *exec_ctx,
uint8_t *p = (uint8_t *)write_buffer; uint8_t *p = (uint8_t *)write_buffer;
/* Append 5 byte header */ /* Append 5 byte header */
/* Compressed flag */ /* Compressed flag */
*p++ = (flags & GRPC_WRITE_INTERNAL_COMPRESS) ? 1 : 0; *p++ = (uint8_t)((flags & GRPC_WRITE_INTERNAL_COMPRESS) ? 1 : 0);
/* Message length */ /* Message length */
*p++ = (uint8_t)(length >> 24); *p++ = (uint8_t)(length >> 24);
*p++ = (uint8_t)(length >> 16); *p++ = (uint8_t)(length >> 16);

Loading…
Cancel
Save