From fef20c64263201f13b61874d92670f242fd541a3 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 28 Apr 2022 17:49:07 +0200 Subject: [PATCH] runmodes: fix more warnings (cherry picked from commit a535cc5a2552d3c46792c5e5b4b3b3b6e74d4b41) --- src/util-runmodes.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.47.2