From 7d84e4900fa8f4ef96e8cf4bb67b76be7902e840 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 4 Apr 2021 23:42:15 +0100 Subject: Fix a ton of pedantic compiler warnings. --- src/inspsocket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inspsocket.cpp') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 893bc304a..0f12aebbe 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -294,7 +294,7 @@ void StreamSocket::FlushSendQ(SendQueue& sq) rv = SocketEngine::WriteV(this, iovecs, bufcount); } - if (rv == (int)sq.bytes()) + if (rv == static_cast(sq.bytes())) { // it's our lucky day, everything got written out. Fast cleanup. // This won't ever happen if the number of buffers got capped. @@ -311,7 +311,7 @@ void StreamSocket::FlushSendQ(SendQueue& sq) while (rv > 0 && !sq.empty()) { const SendQueue::Element& front = sq.front(); - if (front.length() <= (size_t)rv) + if (front.length() <= static_cast(rv)) { // this string got fully written out rv -= front.length(); @@ -518,7 +518,7 @@ void StreamSocket::AddIOHook(IOHook* newhook) return; } - IOHookMiddle* lasthook; + IOHookMiddle* lasthook = nullptr; while (curr) { lasthook = IOHookMiddle::ToMiddleHook(curr); -- cgit v1.3.1-10-gc9f91