From a9031b6bae742b333b1b390192fa590f2ecb07ea Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 5 Oct 2020 11:27:14 +0100 Subject: Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963) * Fix cmake not adding Werror on clang, and _lots_ of warnings * WIP: Build fixes * Cannot make intermediate blockhandler instance * Tiger's changes * Fix BitIndex check * Handle invalid NextState values in cMultiVersionProtocol Co-authored-by: Tiger Wang --- src/Protocol/Protocol_1_9.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/Protocol/Protocol_1_9.cpp') diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp index c170227b5..a152a46cb 100644 --- a/src/Protocol/Protocol_1_9.cpp +++ b/src/Protocol/Protocol_1_9.cpp @@ -632,23 +632,6 @@ bool cProtocol_1_9_0::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketTy } break; } - default: - { - // Received a packet in an unknown state, report: - LOGWARNING("Received a packet in an unknown protocol state %d. Ignoring further packets.", m_State); - - // Cannot kick the client - we don't know this state and thus the packet number for the kick packet - - // Switch to a state when all further packets are silently ignored: - m_State = State::Invalid; - return false; - } - case State::Invalid: - { - // This is the state used for "not processing packets anymore" when we receive a bad packet from a client. - // Do not output anything (the caller will do that for us), just return failure - return false; - } } // switch (m_State) // Unknown packet type, report to the ClientHandle: -- cgit v1.2.3