From: Juliana Fajardini Date: Tue, 5 Aug 2025 15:45:32 +0000 (-0300) Subject: applayer/htp: initialize flag in unit test X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ad4e5e5ba79c3aff918e808d61253d6266563231;p=thirdparty%2Fsuricata.git applayer/htp: initialize flag in unit test To prevent the compiler warning warning: 'MEM[(struct HtpTxUserData *)ptrmem_54].tsflags' may be used uninitialized [-Wmaybe-uninitialized] with LTO. --- diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 86b45f98ca..d051567612 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -7073,7 +7073,7 @@ static int HTPParserTest27(void) HtpTxUserData *tx_ud = SCMalloc(sizeof(HtpTxUserData)); FAIL_IF_NULL(tx_ud); - tx_ud->tsflags |= HTP_STREAM_DEPTH_SET; + tx_ud->tsflags = HTP_STREAM_DEPTH_SET; tx_ud->request_body.content_len_so_far = 2500; FAIL_IF(AppLayerHtpCheckDepth(&cfg, &tx_ud->request_body, tx_ud->tsflags));