aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/bad_client
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2018-02-09 09:16:55 -0800
committerGravatar Noah Eisen <ncteisen@google.com>2018-02-09 09:16:55 -0800
commitbe82e64b3debcdb1d9ec6a149fc85af0d46bfb7e (patch)
treecc5e1234073eb250a2c319b5a4db2919fce060ea /test/core/bad_client
parent194436342137924b4fb7429bede037a4b5ec7edb (diff)
Autofix c casts to c++ casts
Diffstat (limited to 'test/core/bad_client')
-rw-r--r--test/core/bad_client/bad_client.cc8
-rw-r--r--test/core/bad_client/tests/duplicate_header.cc4
-rw-r--r--test/core/bad_client/tests/head_of_line_blocking.cc6
-rw-r--r--test/core/bad_client/tests/window_overflow.cc6
4 files changed, 12 insertions, 12 deletions
diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc
index df803d16a2..ee55a95e4e 100644
--- a/test/core/bad_client/bad_client.cc
+++ b/test/core/bad_client/bad_client.cc
@@ -49,7 +49,7 @@ typedef struct {
/* Run the server side validator and set done_thd once done */
static void thd_func(void* arg) {
- thd_args* a = (thd_args*)arg;
+ thd_args* a = static_cast<thd_args*>(arg);
if (a->validator != nullptr) {
a->validator(a->server, a->cq, a->registered_method);
}
@@ -58,12 +58,12 @@ static void thd_func(void* arg) {
/* Sets the done_write event */
static void set_done_write(void* arg, grpc_error* error) {
- gpr_event* done_write = (gpr_event*)arg;
+ gpr_event* done_write = static_cast<gpr_event*>(arg);
gpr_event_set(done_write, (void*)1);
}
static void server_setup_transport(void* ts, grpc_transport* transport) {
- thd_args* a = (thd_args*)ts;
+ thd_args* a = static_cast<thd_args*>(ts);
grpc_core::ExecCtx exec_ctx;
grpc_server_setup_transport(a->server, transport, nullptr,
grpc_server_get_channel_args(a->server));
@@ -71,7 +71,7 @@ static void server_setup_transport(void* ts, grpc_transport* transport) {
/* Sets the read_done event */
static void set_read_done(void* arg, grpc_error* error) {
- gpr_event* read_done = (gpr_event*)arg;
+ gpr_event* read_done = static_cast<gpr_event*>(arg);
gpr_event_set(read_done, (void*)1);
}
diff --git a/test/core/bad_client/tests/duplicate_header.cc b/test/core/bad_client/tests/duplicate_header.cc
index 0d689bbb7e..12b9c79ab8 100644
--- a/test/core/bad_client/tests/duplicate_header.cc
+++ b/test/core/bad_client/tests/duplicate_header.cc
@@ -87,7 +87,7 @@ static void verifier(grpc_server* server, grpc_completion_queue* cq,
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
+ error = grpc_call_start_batch(s, ops, static_cast<size_t>(op - ops), tag(102), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
@@ -108,7 +108,7 @@ static void verifier(grpc_server* server, grpc_completion_queue* cq,
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
+ error = grpc_call_start_batch(s, ops, static_cast<size_t>(op - ops), tag(103), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
diff --git a/test/core/bad_client/tests/head_of_line_blocking.cc b/test/core/bad_client/tests/head_of_line_blocking.cc
index 8668e091b6..427db46446 100644
--- a/test/core/bad_client/tests/head_of_line_blocking.cc
+++ b/test/core/bad_client/tests/head_of_line_blocking.cc
@@ -117,9 +117,9 @@ int main(int argc, char** argv) {
addbuf(prefix, sizeof(prefix) - 1);
for (i = 0; i < NUM_FRAMES; i++) {
- uint8_t hdr[9] = {(uint8_t)(FRAME_SIZE >> 16),
- (uint8_t)(FRAME_SIZE >> 8),
- (uint8_t)FRAME_SIZE,
+ uint8_t hdr[9] = {static_cast<uint8_t>(FRAME_SIZE >> 16),
+ static_cast<uint8_t>(FRAME_SIZE >> 8),
+ static_cast<uint8_t>(FRAME_SIZE),
0,
0,
0,
diff --git a/test/core/bad_client/tests/window_overflow.cc b/test/core/bad_client/tests/window_overflow.cc
index fe6b05d03a..7c012ac055 100644
--- a/test/core/bad_client/tests/window_overflow.cc
+++ b/test/core/bad_client/tests/window_overflow.cc
@@ -76,9 +76,9 @@ int main(int argc, char** argv) {
addbuf(PFX_STR, sizeof(PFX_STR) - 1);
for (i = 0; i < NUM_FRAMES; i++) {
- uint8_t hdr[9] = {(uint8_t)(FRAME_SIZE >> 16),
- (uint8_t)(FRAME_SIZE >> 8),
- (uint8_t)FRAME_SIZE,
+ uint8_t hdr[9] = {static_cast<uint8_t>(FRAME_SIZE >> 16),
+ static_cast<uint8_t>(FRAME_SIZE >> 8),
+ static_cast<uint8_t>FRAME_SIZE,
0,
0,
0,