]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
cppcheck invalidPrintfArgType_uint warnings
authorG.E <gregory.economou@vectorcamp.gr>
Wed, 24 Apr 2024 12:55:57 +0000 (15:55 +0300)
committerG.E <gregory.economou@vectorcamp.gr>
Wed, 24 Apr 2024 12:55:57 +0000 (15:55 +0300)
benchmarks/benchmarks.cpp
tools/hsbench/engine_hyperscan.cpp

index d8b77992c2e01b2f5bdc9fba03be4d9233f13a8c..5dc08ee44398c99f32a1c1c1d1ab0aef382a2e86 100644 (file)
@@ -102,7 +102,7 @@ static void run_benchmarks(int size, int loops, int max_matches, bool is_reverse
         avg_bw /= max_matches;
        total_sec /= 1000000.0;
         /*convert average time to us*/
-        printf(KMAG "%s: %u matches, %u * %u iterations," KBLU " total elapsed time =" RST " %.3f s, " 
+        printf(KMAG "%s: %d matches, %d * %d iterations," KBLU " total elapsed time =" RST " %.3f s, " 
                KBLU "average time per call =" RST " %.3f μs," KBLU " max bandwidth = " RST " %.3f MB/s," KBLU " average bandwidth =" RST " %.3f MB/s \n",
                bench.label, max_matches, size ,loops, total_sec, avg_time, max_bw, avg_bw);
     } else {
@@ -122,7 +122,7 @@ static void run_benchmarks(int size, int loops, int max_matches, bool is_reverse
         max_bw = total_size / total_sec;
         /*convert to MB/s*/
         max_bw /= 1048576.0;
-        printf(KMAG "%s: no matches, %u * %u iterations," KBLU " total elapsed time =" RST " %.3f s, " 
+        printf(KMAG "%s: no matches, %d * %d iterations," KBLU " total elapsed time =" RST " %.3f s, " 
                KBLU "average time per call =" RST " %.3f μs ," KBLU " bandwidth = " RST " %.3f MB/s \n",
                bench.label, size ,loops, total_sec, avg_time, max_bw );
     }
index 95461de53829c1e23bbcf97b4e7e04cdd724912b..268b14d6fd001b8250dc185d7916804f9a0c993f 100644 (file)
@@ -456,7 +456,7 @@ buildEngineHyperscan(const ExpressionMap &expressions, ScanMode scan_mode,
 
         if (err == HS_COMPILER_ERROR) {
             if (compile_err->expression >= 0) {
-                printf("Compile error for signature #%u: %s\n",
+                printf("Compile error for signature #%d: %s\n",
                        compile_err->expression, compile_err->message);
             } else {
                 printf("Compile error: %s\n", compile_err->message);