From d996d85dcfbf1349acf54d942abc86a13f9e699f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 12 Sep 2026 12:20:31 +0000 Subject: [PATCH] cppcheck: drop unreachable DEBUG_VALIDATE_BUG_ONs Remove unreachable DEBUG_VALIDATE_BUG_ON statements. --- src/stream-tcp.c | 1 - src/util-file-swf-decompression.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 696dea618f..d8192e25e3 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -1970,7 +1970,6 @@ static int StreamTcp3whsStoreSyn(TcpSession *ssn, Packet *p) return 0; if (ssn->queue != NULL && ssn->queue_len == stream_config.max_syn_queued) { - DEBUG_VALIDATE_BUG_ON(ssn->queue == NULL); SCLogDebug("%" PRIu64 ": ssn %p: =~ SYN queue limit reached, rotate", PcapPacketCntGet(p), ssn); StreamTcpSetEvent(p, STREAM_3WHS_SYN_FLOOD); diff --git a/src/util-file-swf-decompression.c b/src/util-file-swf-decompression.c index c640779a1f..a0e1eda118 100644 --- a/src/util-file-swf-decompression.c +++ b/src/util-file-swf-decompression.c @@ -187,7 +187,6 @@ int FileSwfLzmaDecompression(DetectEngineThreadCtx *det_ctx, const uint8_t *comp DetectEngineSetEvent(det_ctx, FILE_DECODER_EVENT_LZMA_MEMLIMIT_ERROR); } else if (ret == LzmaXzError) { /* We should not see XZ compressed SWF files */ - DEBUG_VALIDATE_BUG_ON(ret == LzmaXzError); DetectEngineSetEvent(det_ctx, FILE_DECODER_EVENT_LZMA_XZ_ERROR); } else { DetectEngineSetEvent(det_ctx, FILE_DECODER_EVENT_LZMA_UNKNOWN_ERROR);