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

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

commit 0e7e85f19d6662462f9f82fe9e6e1b9a95594b7c
Author: Walt Karas <[email protected]>
AuthorDate: Mon Oct 10 18:11:56 2022 -0500

    Remove unnecessary, dangerous casts from SET_HANDLER and SET_CONTINUATION 
invocations. (#9129)
    
    Co-authored-by: Walt Karas <[email protected]>
    (cherry picked from commit 07e7ab94c9afedffbbb4efa3e784a90617c7b22a)
---
 iocore/cache/P_CacheHosting.h     |  5 +----
 iocore/dns/DNS.cc                 |  8 ++++----
 iocore/eventsystem/P_Freer.h      |  5 +----
 iocore/hostdb/HostDB.cc           | 18 +++++++++---------
 iocore/hostdb/P_HostDBProcessor.h |  2 +-
 iocore/net/QUICNetVConnection.cc  | 18 +++++++++---------
 iocore/net/SSLNetVConnection.cc   |  2 +-
 iocore/net/Socks.cc               |  2 +-
 iocore/net/UnixNet.cc             |  2 +-
 iocore/net/UnixNetAccept.cc       | 14 +++++++-------
 iocore/net/UnixNetVConnection.cc  |  6 +++---
 iocore/net/UnixUDPNet.cc          |  4 ++--
 proxy/CacheControl.cc             |  5 +----
 proxy/logging/Log.cc              |  2 +-
 src/traffic_server/SocksProxy.cc  |  6 +++---
 15 files changed, 45 insertions(+), 54 deletions(-)

diff --git a/iocore/cache/P_CacheHosting.h b/iocore/cache/P_CacheHosting.h
index 00c8cb0cd..62e46c120 100644
--- a/iocore/cache/P_CacheHosting.h
+++ b/iocore/cache/P_CacheHosting.h
@@ -153,10 +153,7 @@ struct CacheHostTableConfig;
 typedef int (CacheHostTableConfig::*CacheHostTabHandler)(int, void *);
 struct CacheHostTableConfig : public Continuation {
   CacheHostTable **ppt;
-  CacheHostTableConfig(CacheHostTable **appt) : Continuation(nullptr), 
ppt(appt)
-  {
-    SET_HANDLER((CacheHostTabHandler)&CacheHostTableConfig::mainEvent);
-  }
+  CacheHostTableConfig(CacheHostTable **appt) : Continuation(nullptr), 
ppt(appt) { SET_HANDLER(&CacheHostTableConfig::mainEvent); }
 
   int
   mainEvent(int event, Event *e)
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index c8da7474d..a075f0463 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -442,7 +442,7 @@ DNSEntry::init(DNSQueryData target, int qtype_arg, 
Continuation *acont, DNSProce
     }
   }
 
-  SET_HANDLER((DNSEntryHandler)&DNSEntry::mainEvent);
+  SET_HANDLER(&DNSEntry::mainEvent);
 }
 
 /**
@@ -1240,7 +1240,7 @@ DNSEntry::delayEvent(int event, Event *e)
 {
   (void)event;
   if (dnsProcessor.handler) {
-    SET_HANDLER((DNSEntryHandler)&DNSEntry::mainEvent);
+    SET_HANDLER(&DNSEntry::mainEvent);
     return handleEvent(EVENT_IMMEDIATE, e);
   }
   e->schedule_in(DNS_DELAY_PERIOD);
@@ -1261,7 +1261,7 @@ DNSEntry::mainEvent(int event, Event *e)
     }
     if (!dnsH) {
       Debug("dns", "handler not found, retrying...");
-      SET_HANDLER((DNSEntryHandler)&DNSEntry::delayEvent);
+      SET_HANDLER(&DNSEntry::delayEvent);
       return handleEvent(event, e);
     }
 
@@ -1972,7 +1972,7 @@ struct DNSRegressionContinuation : public Continuation {
       i(0),
       test(t)
   {
-    SET_HANDLER((DNSRegContHandler)&DNSRegressionContinuation::mainEvent);
+    SET_HANDLER(&DNSRegressionContinuation::mainEvent);
   }
 };
 
diff --git a/iocore/eventsystem/P_Freer.h b/iocore/eventsystem/P_Freer.h
index deb916d4e..4e2530542 100644
--- a/iocore/eventsystem/P_Freer.h
+++ b/iocore/eventsystem/P_Freer.h
@@ -99,10 +99,7 @@ struct FreerContinuation : public Continuation {
     return EVENT_DONE;
   }
 
-  explicit FreerContinuation(void *ap) : Continuation(nullptr), p(ap)
-  {
-    SET_HANDLER((FreerContHandler)&FreerContinuation::dieEvent);
-  }
+  explicit FreerContinuation(void *ap) : Continuation(nullptr), p(ap) { 
SET_HANDLER(&FreerContinuation::dieEvent); }
 };
 
 TS_INLINE void
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index e39b8fcc5..c351d0fba 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -420,7 +420,7 @@ HostDBProcessor::start(int, size_t)
   hostdb_current_interval = ink_time();
 
   HostDBContinuation *b = hostDBContAllocator.alloc();
-  SET_CONTINUATION_HANDLER(b, 
(HostDBContHandler)&HostDBContinuation::backgroundEvent);
+  SET_CONTINUATION_HANDLER(b, &HostDBContinuation::backgroundEvent);
   b->mutex = new_ProxyMutex();
   eventProcessor.schedule_every(b, HRTIME_SECONDS(1), ET_DNS);
 
@@ -710,7 +710,7 @@ Lretry:
   copt.cont           = cont;
   copt.host_res_style = (hash.db_mark == HOSTDB_MARK_SRV) ? HOST_RES_NONE : 
opt.host_res_style;
   c->init(hash, copt);
-  SET_CONTINUATION_HANDLER(c, 
(HostDBContHandler)&HostDBContinuation::probeEvent);
+  SET_CONTINUATION_HANDLER(c, &HostDBContinuation::probeEvent);
 
   thread->schedule_in(c, MUTEX_RETRY_DELAY);
 
@@ -831,7 +831,7 @@ HostDBProcessor::iterate(Continuation *cont)
   copt.host_res_style = HOST_RES_NONE;
   c->init(HostDBHash(), copt);
   c->current_iterate_pos = 0;
-  SET_CONTINUATION_HANDLER(c, 
(HostDBContHandler)&HostDBContinuation::iterateEvent);
+  SET_CONTINUATION_HANDLER(c, &HostDBContinuation::iterateEvent);
 
   thread->schedule_in(c, HOST_DB_RETRY_PERIOD);
 
@@ -1073,7 +1073,7 @@ HostDBContinuation::dnsPendingEvent(int event, Event *e)
     hostdb_cont_free(this);
     return EVENT_DONE;
   } else {
-    SET_HANDLER((HostDBContHandler)&HostDBContinuation::probeEvent);
+    SET_HANDLER(&HostDBContinuation::probeEvent);
     return probeEvent(EVENT_INTERVAL, nullptr);
   }
 }
@@ -1357,7 +1357,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
       // Check for IP family failover
       if (failed && check_for_retry(hash.db_mark, host_res_style)) {
         this->refresh_hash(); // family changed if we're doing a retry.
-        SET_CONTINUATION_HANDLER(this, 
(HostDBContHandler)&HostDBContinuation::probeEvent);
+        SET_CONTINUATION_HANDLER(this, &HostDBContinuation::probeEvent);
         thread->schedule_in(this, MUTEX_RETRY_DELAY);
         return EVENT_CONT;
       }
@@ -1379,7 +1379,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
       }
 
       if (need_to_reschedule) {
-        SET_HANDLER((HostDBContHandler)&HostDBContinuation::probeEvent);
+        SET_HANDLER(&HostDBContinuation::probeEvent);
         // Will reschedule on affinity thread or current thread
         timeout = eventProcessor.schedule_in(this, HOST_DB_RETRY_PERIOD);
         return EVENT_CONT;
@@ -1617,7 +1617,7 @@ HostDBContinuation::do_dns()
     DNSProcessor::Options opt;
     opt.timeout        = dns_lookup_timeout;
     opt.host_res_style = host_res_style_for(hash.db_mark);
-    SET_HANDLER((HostDBContHandler)&HostDBContinuation::dnsEvent);
+    SET_HANDLER(&HostDBContinuation::dnsEvent);
     if (is_byname()) {
       if (hash.dns_server) {
         opt.handler = hash.dns_server->x_dnsH;
@@ -1632,7 +1632,7 @@ HostDBContinuation::do_dns()
       pending_action = dnsProcessor.gethostbyaddr(this, &hash.ip, opt);
     }
   } else {
-    SET_HANDLER((HostDBContHandler)&HostDBContinuation::dnsPendingEvent);
+    SET_HANDLER(&HostDBContinuation::dnsPendingEvent);
   }
 }
 
@@ -2053,7 +2053,7 @@ struct HostDBTestReverse : public Continuation {
   HostDBTestReverse(RegressionTest *t, int atype, int *astatus)
     : Continuation(new_ProxyMutex()), test(t), type(atype), status(astatus)
   {
-    SET_HANDLER((HostDBTestReverseHandler)&HostDBTestReverse::mainEvent);
+    SET_HANDLER(&HostDBTestReverse::mainEvent);
     randu.seed(std::chrono::system_clock::now().time_since_epoch().count());
   }
 };
diff --git a/iocore/hostdb/P_HostDBProcessor.h 
b/iocore/hostdb/P_HostDBProcessor.h
index 7a05013c7..aedc82397 100644
--- a/iocore/hostdb/P_HostDBProcessor.h
+++ b/iocore/hostdb/P_HostDBProcessor.h
@@ -504,7 +504,7 @@ struct HostDBContinuation : public Continuation {
   {
     ink_zero(hash_host_name_store);
     ink_zero(hash.hash);
-    SET_HANDLER((HostDBContHandler)&HostDBContinuation::probeEvent);
+    SET_HANDLER(&HostDBContinuation::probeEvent);
   }
 };
 
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 979fc86c5..e272c56be 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -242,7 +242,7 @@ void
 QUICNetVConnection::init(QUICVersion version, QUICConnectionId peer_cid, 
QUICConnectionId original_cid, UDPConnection *udp_con,
                          QUICPacketHandler *packet_handler, 
QUICResetTokenTable *rtable)
 {
-  SET_HANDLER((NetVConnHandler)&QUICNetVConnection::startEvent);
+  SET_HANDLER(&QUICNetVConnection::startEvent);
   this->_initial_version             = version;
   this->_udp_con                     = udp_con;
   this->_packet_handler              = packet_handler;
@@ -267,7 +267,7 @@ QUICNetVConnection::init(QUICVersion version, 
QUICConnectionId peer_cid, QUICCon
                          QUICConnectionId retry_cid, UDPConnection *udp_con, 
QUICPacketHandler *packet_handler,
                          QUICResetTokenTable *rtable, QUICConnectionTable 
*ctable)
 {
-  SET_HANDLER((NetVConnHandler)&QUICNetVConnection::acceptEvent);
+  SET_HANDLER(&QUICNetVConnection::acceptEvent);
   this->_initial_version             = version;
   this->_udp_con                     = udp_con;
   this->_packet_handler              = packet_handler;
@@ -366,7 +366,7 @@ QUICNetVConnection::acceptEvent(int event, Event *e)
   this->read.enabled = 1;
 
   // Handshake callback handler.
-  SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_pre_handshake);
+  SET_HANDLER(&QUICNetVConnection::state_pre_handshake);
 
   // Send this netvc to InactivityCop.
   nh->startCop(this);
@@ -576,7 +576,7 @@ QUICNetVConnection::connectUp(EThread *t, int fd)
   this->thread   = this_ethread();
   ink_assert(nh->mutex->thread_holding == this->thread);
 
-  SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_pre_handshake);
+  SET_HANDLER(&QUICNetVConnection::state_pre_handshake);
 
   if ((res = nh->startIO(this)) < 0) {
     // FIXME: startIO only return 0 now! what should we do if it failed ?
@@ -2138,7 +2138,7 @@ void
 QUICNetVConnection::_switch_to_handshake_state()
 {
   QUICConDebug("Enter state_handshake");
-  SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_handshake);
+  SET_HANDLER(&QUICNetVConnection::state_handshake);
 }
 
 void
@@ -2149,7 +2149,7 @@ QUICNetVConnection::_switch_to_established_state()
     QUICConDebug("Negotiated cipher suite: %s", 
this->_handshake_handler->negotiated_cipher_suite());
     this->_record_tls_handshake_end_time();
 
-    
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_established);
+    SET_HANDLER(&QUICNetVConnection::state_connection_established);
 
     std::shared_ptr<const QUICTransportParameters> remote_tp = 
this->_handshake_handler->remote_transport_parameters();
     std::shared_ptr<const QUICTransportParameters> local_tp  = 
this->_handshake_handler->local_transport_parameters();
@@ -2201,7 +2201,7 @@ 
QUICNetVConnection::_switch_to_closing_state(QUICConnectionErrorUPtr error)
   ink_hrtime rto = this->_rtt_measure.current_pto_period();
 
   QUICConDebug("Enter state_connection_closing");
-  SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_closing);
+  SET_HANDLER(&QUICNetVConnection::state_connection_closing);
 
   // This states SHOULD persist for three times the
   // current Retransmission Timeout (RTO) interval as defined in
@@ -2229,7 +2229,7 @@ 
QUICNetVConnection::_switch_to_draining_state(QUICConnectionErrorUPtr error)
   ink_hrtime rto = this->_rtt_measure.current_pto_period();
 
   QUICConDebug("Enter state_connection_draining");
-  SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_draining);
+  SET_HANDLER(&QUICNetVConnection::state_connection_draining);
 
   // This states SHOULD persist for three times the
   // current Retransmission Timeout (RTO) interval as defined in
@@ -2247,7 +2247,7 @@ QUICNetVConnection::_switch_to_close_state()
     QUICConDebug("Switching state without handshake completion");
   }
   QUICConDebug("Enter state_connection_closed");
-  SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_closed);
+  SET_HANDLER(&QUICNetVConnection::state_connection_closed);
   this->_schedule_closed_event();
 }
 
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 51f2d76c8..1575f0c8c 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -1003,7 +1003,7 @@ SSLNetVConnection::free(EThread *t)
   early_data_buf    = nullptr;
 
   clear();
-  SET_CONTINUATION_HANDLER(this, 
(SSLNetVConnHandler)&SSLNetVConnection::startEvent);
+  SET_CONTINUATION_HANDLER(this, &SSLNetVConnection::startEvent);
   ink_assert(con.fd == NO_FD);
   ink_assert(t == this_ethread());
 
diff --git a/iocore/net/Socks.cc b/iocore/net/Socks.cc
index dbc2a0283..0ee6f96b9 100644
--- a/iocore/net/Socks.cc
+++ b/iocore/net/Socks.cc
@@ -195,7 +195,7 @@ SocksEntry::startEvent(int event, void *data)
       auth_handler = &socks5BasicAuthHandler;
     }
 
-    SET_HANDLER((SocksEntryHandler)&SocksEntry::mainEvent);
+    SET_HANDLER(&SocksEntry::mainEvent);
     mainEvent(NET_EVENT_OPEN, data);
   } else {
     if (timeout) {
diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index 07a63ea98..7b78ed556 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -267,7 +267,7 @@ initialize_thread_for_net(EThread *thread)
 
 NetHandler::NetHandler() : Continuation(nullptr)
 {
-  SET_HANDLER((NetContHandler)&NetHandler::mainNetEvent);
+  SET_HANDLER(&NetHandler::mainNetEvent);
 }
 
 int
diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index 074e3038f..ceb3332e1 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -102,7 +102,7 @@ net_accept(NetAccept *na, void *ep, bool blockable)
       vc->read.triggered = 1;
     }
 #endif
-    SET_CONTINUATION_HANDLER(vc, 
(NetVConnHandler)&UnixNetVConnection::acceptEvent);
+    SET_CONTINUATION_HANDLER(vc, &UnixNetVConnection::acceptEvent);
 
     EThread *t;
     NetHandler *h;
@@ -193,7 +193,7 @@ NetAccept::init_accept(EThread *t)
     return;
   }
 
-  SET_HANDLER((NetAcceptHandler)&NetAccept::acceptEvent);
+  SET_HANDLER(&NetAccept::acceptEvent);
   period = -HRTIME_MSECONDS(net_accept_period);
   t->schedule_every(this, period);
 }
@@ -212,9 +212,9 @@ NetAccept::accept_per_thread(int event, void *ep)
   }
 
   if (accept_fn == net_accept) {
-    SET_HANDLER((NetAcceptHandler)&NetAccept::acceptFastEvent);
+    SET_HANDLER(&NetAccept::acceptFastEvent);
   } else {
-    SET_HANDLER((NetAcceptHandler)&NetAccept::acceptEvent);
+    SET_HANDLER(&NetAccept::acceptEvent);
   }
   PollDescriptor *pd = get_PollDescriptor(this_ethread());
   if (this->ep.start(pd, this, EVENTIO_READ) < 0) {
@@ -240,7 +240,7 @@ NetAccept::init_accept_per_thread()
     }
   }
 
-  SET_HANDLER((NetAcceptHandler)&NetAccept::accept_per_thread);
+  SET_HANDLER(&NetAccept::accept_per_thread);
   n = eventProcessor.thread_group[opt.etype]._count;
 
   for (i = 0; i < n; i++) {
@@ -365,7 +365,7 @@ NetAccept::do_blocking_accept(EThread *t)
       vc->read.triggered = 1;
     }
 #endif
-    SET_CONTINUATION_HANDLER(vc, 
(NetVConnHandler)&UnixNetVConnection::acceptEvent);
+    SET_CONTINUATION_HANDLER(vc, &UnixNetVConnection::acceptEvent);
 
     EThread *localt = eventProcessor.assign_thread(opt.etype);
     NetHandler *h   = get_NetHandler(localt);
@@ -518,7 +518,7 @@ NetAccept::acceptFastEvent(int event, void *ep)
       vc->read.triggered = 1;
     }
 #endif
-    SET_CONTINUATION_HANDLER(vc, 
(NetVConnHandler)&UnixNetVConnection::acceptEvent);
+    SET_CONTINUATION_HANDLER(vc, &UnixNetVConnection::acceptEvent);
 
     EThread *t    = e->ethread;
     NetHandler *h = get_NetHandler(t);
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index cdb1d89b8..745c367f9 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -830,7 +830,7 @@ UnixNetVConnection::reenable_re(VIO *vio)
 
 UnixNetVConnection::UnixNetVConnection()
 {
-  SET_HANDLER((NetVConnHandler)&UnixNetVConnection::startEvent);
+  SET_HANDLER(&UnixNetVConnection::startEvent);
 }
 
 // Private methods
@@ -1028,7 +1028,7 @@ UnixNetVConnection::acceptEvent(int event, Event *e)
   SCOPED_MUTEX_LOCK(lock2, mutex, t);
 
   // Setup a timeout callback handler.
-  SET_HANDLER((NetVConnHandler)&UnixNetVConnection::mainEvent);
+  SET_HANDLER(&UnixNetVConnection::mainEvent);
 
   // Send this netvc to InactivityCop.
   nh->startCop(this);
@@ -1299,7 +1299,7 @@ UnixNetVConnection::free(EThread *t)
   con.close();
 
   clear();
-  SET_CONTINUATION_HANDLER(this, 
(NetVConnHandler)&UnixNetVConnection::startEvent);
+  SET_CONTINUATION_HANDLER(this, &UnixNetVConnection::startEvent);
   ink_assert(con.fd == NO_FD);
   ink_assert(t == this_ethread());
 
diff --git a/iocore/net/UnixUDPNet.cc b/iocore/net/UnixUDPNet.cc
index 6f64a59eb..015cc8d3f 100644
--- a/iocore/net/UnixUDPNet.cc
+++ b/iocore/net/UnixUDPNet.cc
@@ -1035,14 +1035,14 @@ UDPNetHandler::UDPNetHandler()
 {
   nextCheck = Thread::get_hrtime_updated() + HRTIME_MSECONDS(1000);
   lastCheck = 0;
-  SET_HANDLER((UDPNetContHandler)&UDPNetHandler::startNetEvent);
+  SET_HANDLER(&UDPNetHandler::startNetEvent);
 }
 
 int
 UDPNetHandler::startNetEvent(int event, Event *e)
 {
   (void)event;
-  SET_HANDLER((UDPNetContHandler)&UDPNetHandler::mainNetEvent);
+  SET_HANDLER(&UDPNetHandler::mainNetEvent);
   trigger_event = e;
   e->schedule_every(-HRTIME_MSECONDS(UDP_NH_PERIOD));
   return EVENT_CONT;
diff --git a/proxy/CacheControl.cc b/proxy/CacheControl.cc
index f1ed4e242..d2845e6b6 100644
--- a/proxy/CacheControl.cc
+++ b/proxy/CacheControl.cc
@@ -81,10 +81,7 @@ struct CC_FreerContinuation : public Continuation {
     delete this;
     return EVENT_DONE;
   }
-  CC_FreerContinuation(CC_table *ap) : Continuation(nullptr), p(ap)
-  {
-    SET_HANDLER((CC_FreerContHandler)&CC_FreerContinuation::freeEvent);
-  }
+  CC_FreerContinuation(CC_table *ap) : Continuation(nullptr), p(ap) { 
SET_HANDLER(&CC_FreerContinuation::freeEvent); }
 };
 
 // struct CC_UpdateContinuation
diff --git a/proxy/logging/Log.cc b/proxy/logging/Log.cc
index 438aba4f1..df0c78049 100644
--- a/proxy/logging/Log.cc
+++ b/proxy/logging/Log.cc
@@ -182,7 +182,7 @@ struct PeriodicWakeup : Continuation {
   PeriodicWakeup(int preproc_threads, int flush_threads)
     : Continuation(new_ProxyMutex()), m_preproc_threads(preproc_threads), 
m_flush_threads(flush_threads)
   {
-    SET_HANDLER((PeriodicWakeupHandler)&PeriodicWakeup::wakeup);
+    SET_HANDLER(&PeriodicWakeup::wakeup);
   }
 };
 
diff --git a/src/traffic_server/SocksProxy.cc b/src/traffic_server/SocksProxy.cc
index 62799a045..0ae9b574a 100644
--- a/src/traffic_server/SocksProxy.cc
+++ b/src/traffic_server/SocksProxy.cc
@@ -149,7 +149,7 @@ SocksProxy::init(NetVConnection *netVC)
 
   SCOPED_MUTEX_LOCK(lock, mutex, this_ethread());
 
-  SET_HANDLER(static_cast<EventHandler>(&SocksProxy::acceptEvent));
+  SET_HANDLER(&SocksProxy::acceptEvent);
 
   handleEvent(NET_EVENT_ACCEPT, netVC);
 }
@@ -178,7 +178,7 @@ SocksProxy::acceptEvent(int event, void *data)
 
   buf->reset();
 
-  SET_HANDLER(static_cast<EventHandler>(&SocksProxy::mainEvent));
+  SET_HANDLER(&SocksProxy::mainEvent);
   vc_handler = &SocksProxy::state_read_client_request;
 
   timeout   = this_ethread()->schedule_in(this, 
HRTIME_SECONDS(netProcessor.socks_conf_stuff->socks_timeout));
@@ -694,7 +694,7 @@ struct SocksAccepter : public Continuation {
   }
 
   // There is no state used we dont need a mutex
-  SocksAccepter() : Continuation(nullptr) { 
SET_HANDLER((SocksAccepterHandler)&SocksAccepter::mainEvent); }
+  SocksAccepter() : Continuation(nullptr) { 
SET_HANDLER(&SocksAccepter::mainEvent); }
 };
 
 void

Reply via email to