]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: Remove unused data members (#1082)
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 8 Jul 2022 13:48:36 +0000 (13:48 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 10 Jul 2022 13:59:49 +0000 (13:59 +0000)
These handlerSubscription fields blocked quite useful static assertions.
They are in the way of callback improvements; that work has discovered
that they are unused (since inception in merge commit 1c8f25b).

src/ipc/SharedListen.cc
src/ipc/SharedListen.h
src/ipc/StartListening.h
src/ipc/TypedMsgHdr.h

index 7943a8ef64dd4d7d5a28497c5767102e3367a408..d6938b6d9081b480e6d989c50fdd0b21e5b192c2 100644 (file)
@@ -80,14 +80,12 @@ Ipc::SharedListenRequest::SharedListenRequest(const OpenListenerParams &aParams,
 Ipc::SharedListenRequest::SharedListenRequest(const TypedMsgHdr &hdrMsg)
 {
     hdrMsg.checkType(mtSharedListenRequest);
-    // XXX: our handlerSubscription is not a POD!
     hdrMsg.getPod(*this);
 }
 
 void Ipc::SharedListenRequest::pack(TypedMsgHdr &hdrMsg) const
 {
     hdrMsg.setType(mtSharedListenRequest);
-    // XXX: our handlerSubscription is not a POD!
     hdrMsg.putPod(*this);
 }
 
@@ -191,7 +189,6 @@ void Ipc::SharedListenJoined(const SharedListenResponse &response)
     }
 
     cbd->errNo = response.errNo;
-    cbd->handlerSubscription = por.params.handlerSubscription;
     ScheduleCallHere(por.callback);
 
     kickDelayedRequest();
index f9b42ef5e72a127375738d1c7cdefe559ce92099..3f72c3dfd8832d797390e9b96a5da883ddef7fe6 100644 (file)
@@ -36,9 +36,6 @@ public:
     // bits to re-create the listener Comm::Connection descriptor
     Ip::Address addr; ///< will be memset and memcopied
     int flags = 0;
-
-    /// handler to subscribe to Comm::ConnAcceptor when we get the response
-    Subscription::Pointer handlerSubscription;
 };
 
 class TypedMsgHdr;
index b1a035dfd87b478b6419ff385811a954c1667284..23d962b9c9d094d89dfd1cde8474e00675c2a561 100644 (file)
@@ -35,7 +35,6 @@ public:
 public:
     Comm::ConnectionPointer conn; ///< opened listening socket
     int errNo; ///< errno value from the comm_open_listener() call
-    Subscription::Pointer handlerSubscription; ///< The subscription we will pass on to the ConnAcceptor
 };
 
 /// Depending on whether SMP is on, either ask Coordinator to send us
index 1055e02d46a37501c367e9da711c472dfaa361de..ba61dbb94eb84cc00043256f93d94ab35d953c1c 100644 (file)
@@ -23,6 +23,8 @@
 #include <sys/un.h>
 #endif
 
+#include <type_traits>
+
 class String;
 
 namespace Ipc
@@ -116,8 +118,7 @@ void
 Ipc::TypedMsgHdr::getPod(Pod &pod) const
 {
 #if HAVE_STD_IS_TRIVIALLY_COPYABLE
-    // TODO: Enable after fixing Ipc::SharedListenRequest::SharedListenRequest()
-    //static_assert(std::is_trivially_copyable<Pod>::value, "getPod() used for a POD");
+    static_assert(std::is_trivially_copyable<Pod>::value, "getPod() used for a POD");
 #endif
     getFixed(&pod, sizeof(pod));
 }
@@ -127,8 +128,7 @@ void
 Ipc::TypedMsgHdr::putPod(const Pod &pod)
 {
 #if HAVE_STD_IS_TRIVIALLY_COPYABLE
-    // TODO: Enable after fixing Ipc::SharedListenRequest::pack()
-    //static_assert(std::is_trivially_copyable<Pod>::value, "putPod() used for a POD");
+    static_assert(std::is_trivially_copyable<Pod>::value, "putPod() used for a POD");
 #endif
     putFixed(&pod, sizeof(pod));
 }