From: Anna Norokh -X (anorokh - SOFTSERVE INC at Cisco) Date: Fri, 1 Aug 2025 08:00:11 +0000 (+0000) Subject: Pull request #4845: detection: fix compile warnings in detection_options.cc X-Git-Tag: 3.9.3.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99a8572edbe961eb44a803d09a03414a534e5680;p=thirdparty%2Fsnort3.git Pull request #4845: detection: fix compile warnings in detection_options.cc Merge in SNORT/snort3 from ~ANOROKH/snort3:fix_detection_options_warns to master Squashed commit of the following: commit 74dd5e90015dc7f2528f97b1e90f6a9235de2d61 Author: anorokh Date: Thu Jul 31 19:29:04 2025 +0300 detection: fix compile warnings in detection_options.cc --- diff --git a/src/detection/detection_options.cc b/src/detection/detection_options.cc index eafea7461..f90878d32 100644 --- a/src/detection/detection_options.cc +++ b/src/detection/detection_options.cc @@ -791,7 +791,7 @@ void free_detection_option_root(void** existing_tree) #include "filters/sfthd.h" -void set_was_evaluated(detection_option_tree_node_t& n, Packet* p, +static void set_was_evaluated(detection_option_tree_node_t& n, Packet* p, dot_node_state_t& s, uint64_t& c_num) { n.is_relative = false; @@ -1071,20 +1071,20 @@ class MockIpsBufSetter : public IpsOption { public: MockIpsBufSetter(const char* s) : IpsOption(s) - { }; + { } CursorActionType get_cursor_type() const override - { return CAT_SET_SUB_SECTION; }; + { return CAT_SET_SUB_SECTION; } }; class MockIpsOptRead : public IpsOption { public: MockIpsOptRead(const char* s) : IpsOption(s) - { }; + { } CursorActionType get_cursor_type() const override - { return CAT_READ; }; + { return CAT_READ; } }; TEST_CASE("Detection Engine: match_node", "[de_core]") @@ -1120,13 +1120,13 @@ class MockIpsOptPMD : public IpsOption { public: MockIpsOptPMD(const char* s) : IpsOption(s) - { pmd = new PatternMatchData(); }; + { pmd = new PatternMatchData(); } - ~MockIpsOptPMD() + ~MockIpsOptPMD() override { delete pmd; } CursorActionType get_cursor_type() const override - { return CAT_READ; }; + { return CAT_READ; } PatternMatchData* get_pattern(SnortProtocolId, RuleDirection) override { return pmd; }