cppcheck fixes, mostly %d->%u

This commit is contained in:
Isaac Connor 2020-11-02 12:45:48 -05:00
parent 5d32e0faf0
commit a857f677a6
1 changed files with 3 additions and 3 deletions

View File

@ -503,7 +503,7 @@ void MonitorStream::runStream() {
const int max_swap_len_suffix = 15; const int max_swap_len_suffix = 15;
int swap_path_length = staticConfig.PATH_SWAP.length() + 1; // +1 for NULL terminator int swap_path_length = staticConfig.PATH_SWAP.length() + 1; // +1 for NULL terminator
int subfolder1_length = snprintf(nullptr, 0, "/zmswap-m%d", monitor->Id()) + 1; int subfolder1_length = snprintf(nullptr, 0, "/zmswap-m%u", monitor->Id()) + 1;
int subfolder2_length = snprintf(nullptr, 0, "/zmswap-q%06d", connkey) + 1; int subfolder2_length = snprintf(nullptr, 0, "/zmswap-q%06d", connkey) + 1;
int total_swap_path_length = swap_path_length + subfolder1_length + subfolder2_length; int total_swap_path_length = swap_path_length + subfolder1_length + subfolder2_length;
@ -874,7 +874,7 @@ void MonitorStream::SingleImageRaw(int scale) {
} }
fprintf(stdout, fprintf(stdout,
"Content-Length: %d\r\n" "Content-Length: %u\r\n"
"Content-Type: image/x-rgb\r\n\r\n", "Content-Type: image/x-rgb\r\n\r\n",
snap_image->Size()); snap_image->Size());
fwrite(snap_image->Buffer(), snap_image->Size(), 1, stdout); fwrite(snap_image->Buffer(), snap_image->Size(), 1, stdout);