From: Victor Julien Date: Thu, 28 Apr 2022 15:49:07 +0000 (+0200) Subject: runmodes: fix more warnings X-Git-Tag: suricata-6.0.6~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7462%2Fhead;p=thirdparty%2Fsuricata.git runmodes: fix more warnings (cherry picked from commit a535cc5a2552d3c46792c5e5b4b3b3b6e74d4b41) --- diff --git a/src/util-runmodes.c b/src/util-runmodes.c index 610d1bb230..4943152177 100644 --- a/src/util-runmodes.c +++ b/src/util-runmodes.c @@ -207,9 +207,9 @@ int RunModeSetLiveCaptureAutoFp(ConfigIfaceParserFunc ConfigParser, } } - for (int thread = 0; thread < thread_max; thread++) { - snprintf(tname, sizeof(tname), "%s#%02d", thread_name_workers, thread + 1); - snprintf(qname, sizeof(qname), "pickup%d", thread + 1); + for (uint16_t thread = 0; thread < thread_max; thread++) { + snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, (uint16_t)(thread + 1)); + snprintf(qname, sizeof(qname), "pickup%u", (uint16_t)(thread + 1)); SCLogDebug("tname %s, qname %s", tname, qname); @@ -453,9 +453,9 @@ int RunModeSetIPSAutoFp(ConfigIPSParserFunc ConfigParser, } for (int thread = 0; thread < thread_max; thread++) { - snprintf(tname, sizeof(tname), "%s#%02d", thread_name_workers, thread + 1); + snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, (uint16_t)(thread + 1)); char qname[TM_QUEUE_NAME_MAX]; - snprintf(qname, sizeof(qname), "pickup%d", thread + 1); + snprintf(qname, sizeof(qname), "pickup%u", (uint16_t)(thread + 1)); SCLogDebug("tname %s, qname %s", tname, qname);