]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
runmodes: fix more warnings
authorVictor Julien <vjulien@oisf.net>
Thu, 28 Apr 2022 15:49:07 +0000 (17:49 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 9 May 2022 14:06:37 +0000 (16:06 +0200)
src/util-runmodes.c

index 79f19ea03ec7a06146c726553a7c9a78d1880385..2e7a21c4ead63f84616fb131b70eb54af118b1b8 100644 (file)
@@ -206,9 +206,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);
 
@@ -452,9 +452,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);