diff --git a/src/RandTest.cc b/src/RandTest.cc index c97c586d02..a8f2f4bfc1 100644 --- a/src/RandTest.cc +++ b/src/RandTest.cc @@ -68,7 +68,6 @@ void RandTest::add(const void* buf, int bufl) { scct2 = scct2 + oc; scct3 = scct3 + (oc * oc); scclast = oc; - oc <<= 1; } } diff --git a/src/ScriptProfile.h b/src/ScriptProfile.h index cea8b002fc..7cd2cccfb4 100644 --- a/src/ScriptProfile.h +++ b/src/ScriptProfile.h @@ -35,7 +35,7 @@ public: ScriptProfileStats& operator=(ScriptProfileStats&&) = default; ScriptProfileStats& operator=(const ScriptProfileStats&) = default; - const auto Name() const { return name; } + const auto& Name() const { return name; } // Number of instances included in an aggregate (like for "all BiFs"). // This is 1 for non-aggregates. diff --git a/src/analyzer/protocol/rpc/RPC.cc b/src/analyzer/protocol/rpc/RPC.cc index 7ecec676e5..e0473db3fd 100644 --- a/src/analyzer/protocol/rpc/RPC.cc +++ b/src/analyzer/protocol/rpc/RPC.cc @@ -554,10 +554,9 @@ void Contents_RPC::DeliverStream(int len, const u_char* data, bool orig) { // know yet how much we expect, so we set expected to // 0. msg_buf.Init(MAX_RPC_LEN, 0); - last_frag = false; state = WAIT_FOR_MARKER; start_time = run_state::network_time; - // no break. fall through + [[fallthrough]]; case WAIT_FOR_MARKER: { bool got_marker = marker_buf.ConsumeChunk(data, len);