From 00a9edae3e035ff9d5ca1349be3b4e668cceaf44 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 24 Apr 2023 14:49:18 -0600 Subject: [PATCH] detect-fast-pattern: remove unused var alertcnt Set, but never read. Caught by -Wunused-but-set-variable which is enabled in the newer Fedora CI builders. --- src/detect-fast-pattern.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/detect-fast-pattern.c b/src/detect-fast-pattern.c index 408aafe4b6..5860d472f6 100644 --- a/src/detect-fast-pattern.c +++ b/src/detect-fast-pattern.c @@ -520,7 +520,6 @@ static int DetectFastPatternTest14(void) Packet *p = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - int alertcnt = 0; int result = 0; memset(&th_v, 0, sizeof(th_v)); @@ -548,9 +547,7 @@ static int DetectFastPatternTest14(void) DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx); SigMatchSignatures(&th_v, de_ctx, det_ctx, p); - if (PacketAlertCheck(p, 1)){ - alertcnt++; - }else{ + if (!PacketAlertCheck(p, 1)) { SCLogInfo("could not match on sig 1 with when fast_pattern is inspecting payload"); goto end; } -- 2.47.2