Merge pull request #257 from isildur-g/wip-isildur-g-cppcheck56

cppcheck warnings 5,6
This commit is contained in:
Konstantinos Margaritis 2024-04-25 10:18:07 +03:00 committed by GitHub
commit 131672d175
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 5 deletions

View File

@ -104,9 +104,8 @@ static void run_benchmarks(int size, int loops, int max_matches,
avg_bw /= max_matches;
total_sec /= 1000000.0;
/*convert average time to us*/
printf("%-18s, %-12u, %-10u, %-6u, %-10.3f, %-9.3f, %-8.3f, %-7.3f\n",
bench.label, max_matches, size, loops, total_sec, avg_time,
max_bw, avg_bw);
printf("%-18s, %-12d, %-10d, %-6d, %-10.3f, %-9.3f, %-8.3f, %-7.3f\n",
bench.label, max_matches, size ,loops, total_sec, avg_time, max_bw, avg_bw);
} else {
auto start = std::chrono::steady_clock::now();
for (int i = 0; i < loops; i++) {
@ -126,7 +125,7 @@ static void run_benchmarks(int size, int loops, int max_matches,
max_bw = total_size / total_sec;
/*convert to MB/s*/
max_bw /= 1048576.0;
printf("%-18s, %-12s, %-10u, %-6u, %-10.3f, %-9.3f, %-8.3f, %-7s\n",
printf("%-18s, %-12s, %-10d, %-6d, %-10.3f, %-9.3f, %-8.3f, %-7s\n",
bench.label, "0", size, loops, total_sec, avg_time, max_bw, "0");
}
}

View 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);