]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: suppress scan-build warning
authorVictor Julien <victor@inliniac.net>
Thu, 12 Aug 2021 14:23:11 +0000 (16:23 +0200)
committerPhilippe Antoine <contact@catenacyber.fr>
Fri, 24 Sep 2021 13:22:09 +0000 (15:22 +0200)
src/detect-engine.c

index db41e58b918caf7afa917bdbebc4e98f84c75099..51bb3e25f2971ec762382511dd7b2933ede43c41 100644 (file)
@@ -1080,7 +1080,9 @@ void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size)
 void InspectionBufferSetupMulti(InspectionBuffer *buffer, const DetectEngineTransforms *transforms,
         const uint8_t *data, const uint32_t data_len)
 {
+#ifdef DEBUG_VALIDATION
     DEBUG_VALIDATE_BUG_ON(!buffer->multi);
+#endif
     buffer->inspect = buffer->orig = data;
     buffer->inspect_len = buffer->orig_len = data_len;
     buffer->len = 0;
@@ -1092,7 +1094,9 @@ void InspectionBufferSetupMulti(InspectionBuffer *buffer, const DetectEngineTran
 void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
         InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
 {
+#ifdef DEBUG_VALIDATION
     DEBUG_VALIDATE_BUG_ON(buffer->multi);
+#endif
     if (buffer->inspect == NULL) {
 #ifdef UNITTESTS
         if (det_ctx && list_id != -1)