]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3647: ports: enable checks in debug build only
authorOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Tue, 1 Nov 2022 12:46:07 +0000 (12:46 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Tue, 1 Nov 2022 12:46:07 +0000 (12:46 +0000)
Merge in SNORT/snort3 from ~OSHUMEIK/snort3:fix_po_po2 to master

Squashed commit of the following:

commit 14b1e9922e153058837ad4eab1d0a80bccc5dd97
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date:   Tue Nov 1 11:19:27 2022 +0200

    ports: enable checks in debug build only

src/ports/port_object2.cc

index 467ccb2511c3c52d059ab01b80ff442a9124eb12..9a1bb22a4da276fbef3424547b28ec8941ba59f1 100644 (file)
@@ -38,6 +38,7 @@
 
 using namespace snort;
 
+#ifndef NDEBUG
 static void check_structures()
 {
     using po1 = PortObject;
@@ -55,6 +56,7 @@ static void check_structures()
 }
 
 static int _check_structures __attribute__((unused)) = (static_cast<void>(check_structures()), 0);
+#endif
 
 #define PO_EXTRA_RULE_CNT 25