This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 098d3b70e159a0319cc8405fc6a7a6054db23b8e
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Thu Jun 7 12:10:20 2018 +0200

    Explicitly cast pointers
    
    The same fix as 9b0c94684a2e8e5ccfad51ac1fe8f711ceec808f but for old stuff 
that doesn't exist on master
---
 iocore/aio/AIO.cc                    | 2 +-
 iocore/cluster/ClusterHandlerBase.cc | 2 +-
 iocore/hostdb/HostDB.cc              | 4 ++--
 proxy/ICPConfig.cc                   | 2 +-
 proxy/http/HttpSM.cc                 | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc
index f9efaa0..81ec6d8 100644
--- a/iocore/aio/AIO.cc
+++ b/iocore/aio/AIO.cc
@@ -223,7 +223,7 @@ aio_init_fildes(int fildes, int fromAPI = 0)
   int i;
   AIO_Reqs *request = (AIO_Reqs *)ats_malloc(sizeof(AIO_Reqs));
 
-  memset(request, 0, sizeof(AIO_Reqs));
+  memset(static_cast<void *>(request), 0, sizeof(AIO_Reqs));
 
   INK_WRITE_MEMORY_BARRIER;
 
diff --git a/iocore/cluster/ClusterHandlerBase.cc 
b/iocore/cluster/ClusterHandlerBase.cc
index 36011d6..8ddf1bb 100644
--- a/iocore/cluster/ClusterHandlerBase.cc
+++ b/iocore/cluster/ClusterHandlerBase.cc
@@ -632,7 +632,7 @@ ClusterHandler::check_channel(int c)
         if (i > LAST_DEDICATED_CHANNEL) {
           channels[i]     = (ClusterVConnection *)1; // mark as invalid
           channel_data[i] = (struct ChannelData *)ats_malloc(sizeof(struct 
ChannelData));
-          memset(channel_data[i], 0, sizeof(struct ChannelData));
+          memset(static_cast<void *>(channel_data[i]), 0, sizeof(struct 
ChannelData));
           channel_data[i]->channel_number = i;
           free_local_channels.enqueue(channel_data[i]);
         } else {
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index 072c397..6dd2f87 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -1523,7 +1523,7 @@ HostDBContinuation::do_get_response(Event * /* e 
ATS_UNUSED */)
   //
   HostDB_get_message msg;
 
-  memset(&msg, 0, sizeof(msg));
+  memset(static_cast<void *>(&msg), 0, sizeof(msg));
   int len = make_get_message((char *)&msg, sizeof(HostDB_get_message));
 
   // Setup this continuation, with a timeout
@@ -1566,7 +1566,7 @@ HostDBContinuation::make_put_message(HostDBInfo *r, 
Continuation *c, char *buf,
   ink_assert(size >= (int)sizeof(HostDB_put_message));
 
   HostDB_put_message *msg = reinterpret_cast<HostDB_put_message *>(buf);
-  memset(msg, 0, sizeof(HostDB_put_message));
+  memset(static_cast<void *>(msg), 0, sizeof(HostDB_put_message));
 
   msg->md5  = md5.hash;
   msg->cont = c;
diff --git a/proxy/ICPConfig.cc b/proxy/ICPConfig.cc
index a511089..aa1ceeb 100644
--- a/proxy/ICPConfig.cc
+++ b/proxy/ICPConfig.cc
@@ -495,7 +495,7 @@ ICPConfiguration::UpdatePeerConfig()
     // Broken on DEC and Solaris x86
     // *_peer_cdata[i] = *_peer_cdata_current[i];
     //
-    memcpy(_peer_cdata[i], _peer_cdata_current[i], sizeof(*_peer_cdata[i]));
+    memcpy(static_cast<void *>(_peer_cdata[i]), _peer_cdata_current[i], 
sizeof(*_peer_cdata[i]));
     // Setup IP address
     if ((_peer_cdata[i]->_ip_addr.isValid()) && _peer_cdata[i]->_hostname[0]) {
       // IP address not specified, lookup using hostname.
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index f734ad9..7309f54 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -329,7 +329,7 @@ HttpSM::HttpSM()
     parse_range_done(false)
 {
   memset(&history, 0, sizeof(history));
-  memset(&vc_table, 0, sizeof(vc_table));
+  memset(static_cast<void *>(&vc_table), 0, sizeof(vc_table));
   memset(&http_parser, 0, sizeof(http_parser));
 }
 

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to