diff --git a/src/core/surface/call.c b/src/core/surface/call.c index ad022f43b1a..6b0395ab002 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -427,9 +427,8 @@ static grpc_cq_completion *allocate_completion(grpc_call *call) { } /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ call->allocated_completions = (gpr_uint8)(call->allocated_completions | (1u << i)); gpr_mu_unlock(&call->completion_mu); @@ -744,9 +743,8 @@ static void finish_live_ioreq_op(grpc_call *call, grpc_ioreq_op op, master = &call->masters[master_set]; /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ master->complete_mask = (gpr_uint16)(master->complete_mask | (1u << op)); if (!success) { master->success = 0; @@ -1259,9 +1257,8 @@ static grpc_call_error start_ioreq(grpc_call *call, const grpc_ioreq *reqs, } /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ have_ops = (gpr_uint16)(have_ops | (1u << op)); call->request_data[op] = data; diff --git a/src/core/transport/chttp2/bin_encoder.c b/src/core/transport/chttp2/bin_encoder.c index 5266f3ebf77..9c9070ede4f 100644 --- a/src/core/transport/chttp2/bin_encoder.c +++ b/src/core/transport/chttp2/bin_encoder.c @@ -187,9 +187,8 @@ gpr_slice grpc_chttp2_huffman_compress(gpr_slice input) { if (temp_length) { /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ *out++ = (gpr_uint8)((gpr_uint8)(temp << (8u - temp_length)) | (gpr_uint8)(0xffu >> temp_length)); } @@ -272,9 +271,8 @@ gpr_slice grpc_chttp2_base64_encode_and_huffman_compress(gpr_slice input) { if (out.temp_length) { /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ *out.out++ = (gpr_uint8)((gpr_uint8)(out.temp << (8u - out.temp_length)) | (gpr_uint8)(0xffu >> out.temp_length)); } diff --git a/tools/codegen/core/gen_hpack_tables.c b/tools/codegen/core/gen_hpack_tables.c index 48398bebd53..bae4e4cd734 100644 --- a/tools/codegen/core/gen_hpack_tables.c +++ b/tools/codegen/core/gen_hpack_tables.c @@ -73,9 +73,8 @@ static unsigned char prefix_mask(unsigned char prefix_len) { for (i = 0; i < prefix_len; i++) { /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ out = (unsigned char)(out | (unsigned char)(1 << (7 - i))); } return out; @@ -99,9 +98,8 @@ static void generate_first_byte_lut(void) { if ((prefix_mask(fields[j].prefix_length) & i) == fields[j].prefix) { /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the - * result of the bitwise AND to "unsigned". A cast to the smaller - * container type is then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container + * type is then required to avoid the compiler warning */ suffix = (unsigned char)(suffix_mask(fields[j].prefix_length) & (unsigned char)i); if (suffix == suffix_mask(fields[j].prefix_length)) { diff --git a/tools/codegen/core/gen_legal_metadata_characters.c b/tools/codegen/core/gen_legal_metadata_characters.c index 37189165771..677fa5c1556 100644 --- a/tools/codegen/core/gen_legal_metadata_characters.c +++ b/tools/codegen/core/gen_legal_metadata_characters.c @@ -43,9 +43,8 @@ static void legal(int x) { int bit = x % 8; /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ legal_bits[byte] = (unsigned char)((legal_bits[byte] | (unsigned char)(1 << bit))); }