]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
runmodes: fix more warnings 7462/head
authorVictor Julien <vjulien@oisf.net>
Thu, 28 Apr 2022 15:49:07 +0000 (17:49 +0200)
committerVictor Julien <vjulien@oisf.net>
Wed, 1 Jun 2022 11:25:19 +0000 (13:25 +0200)
(cherry picked from commit a535cc5a2552d3c46792c5e5b4b3b3b6e74d4b41)

src/util-runmodes.c

index 610d1bb230c6fb4aa54af5944762561912ac8ddb..49431521773cd4cb1f36e62c4a853aa662c75965 100644 (file)
@@ -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);