Problem: use of C-style casts

Solution: use static_cast/reinterpret_cast instead
This commit is contained in:
Simon Giesecke
2019-12-08 14:26:57 +01:00
committed by Simon Giesecke
parent a83c57d0bb
commit cd954e207d
31 changed files with 123 additions and 107 deletions

View File

@@ -109,7 +109,7 @@ void test_app_meta_reqrep ()
rc = zmq_msg_init_size (&msg, 1);
TEST_ASSERT_EQUAL_INT (0, rc);
char *data = (char *) zmq_msg_data (&msg);
char *data = static_cast<char *> (zmq_msg_data (&msg));
data[0] = 1;
rc = zmq_msg_send (&msg, req_sock, 0);
@@ -123,7 +123,7 @@ void test_app_meta_reqrep ()
TEST_ASSERT_EQUAL_STRING ("hello", zmq_msg_gets (&msg, "X-hello"));
TEST_ASSERT_EQUAL_STRING ("primary", zmq_msg_gets (&msg, "X-connection"));
char *bindata = (char *) zmq_msg_gets (&msg, "X-bin");
char *bindata = const_cast<char *> (zmq_msg_gets (&msg, "X-bin"));
TEST_ASSERT_NOT_NULL (bindata);
uint8_t rawdata[4];
void *ret = zmq_z85_decode (rawdata, bindata);