cppcheck:
src/util-runmodes.c:210:9: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, thread+1);
^
src/util-runmodes.c:211:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
snprintf(qname, sizeof(qname), "pickup%u", thread+1);
^
src/util-runmodes.c:455:9: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, thread+1);
^
src/util-runmodes.c:457:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
snprintf(qname, sizeof(qname), "pickup%u", thread+1);
^
src/runmode-erf-file.c:188:9: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, thread+1);
^
src/runmode-erf-file.c:189:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
snprintf(qname, sizeof(qname), "pickup%u", thread+1);
^
src/runmode-pcap-file.c:201:9: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, thread+1);
^
src/runmode-pcap-file.c:202:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
snprintf(qname, sizeof(qname), "pickup%u", thread+1);
^
Bug: #5291.
(cherry picked from commit
2965d809a44817223d3e6bc81e55c2286da5212b)
}
for (thread = 0; thread < (uint16_t)thread_max; thread++) {
- snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, thread+1);
- snprintf(qname, sizeof(qname), "pickup%u", thread+1);
+ snprintf(tname, sizeof(tname), "%s#%02d", thread_name_workers, thread + 1);
+ snprintf(qname, sizeof(qname), "pickup%d", thread + 1);
SCLogDebug("tname %s, qname %s", tname, qname);
}
for (thread = 0; thread < (uint16_t)thread_max; thread++) {
- snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, thread+1);
- snprintf(qname, sizeof(qname), "pickup%u", thread+1);
+ snprintf(tname, sizeof(tname), "%s#%02d", thread_name_workers, thread + 1);
+ snprintf(qname, sizeof(qname), "pickup%d", thread + 1);
SCLogDebug("tname %s, qname %s", tname, qname);
SCLogDebug("Assigning %s affinity to cpu %u", tname, cpu);
}
for (int thread = 0; thread < thread_max; thread++) {
- snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, thread+1);
- snprintf(qname, sizeof(qname), "pickup%u", thread+1);
+ snprintf(tname, sizeof(tname), "%s#%02d", thread_name_workers, thread + 1);
+ snprintf(qname, sizeof(qname), "pickup%d", thread + 1);
SCLogDebug("tname %s, qname %s", tname, qname);
}
for (int thread = 0; thread < thread_max; thread++) {
- snprintf(tname, sizeof(tname), "%s#%02u", thread_name_workers, thread+1);
+ snprintf(tname, sizeof(tname), "%s#%02d", thread_name_workers, thread + 1);
char qname[TM_QUEUE_NAME_MAX];
- snprintf(qname, sizeof(qname), "pickup%u", thread+1);
+ snprintf(qname, sizeof(qname), "pickup%d", thread + 1);
SCLogDebug("tname %s, qname %s", tname, qname);