From: Victor Julien Date: Mon, 15 Nov 2021 15:03:02 +0000 (+0100) Subject: detect: suppress scan-build warning X-Git-Tag: suricata-5.0.8~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cada20276a23b8857b6e18ef3ce84b6caa3fccca;p=thirdparty%2Fsuricata.git detect: suppress scan-build warning --- diff --git a/src/detect-engine.c b/src/detect-engine.c index 9877c6c906..bcd6c373f4 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -1130,7 +1130,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; @@ -1142,7 +1144,9 @@ void InspectionBufferSetupMulti(InspectionBuffer *buffer, 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)