Skip to content

Commit

Permalink
fix warnings on newer compilers about printf type
Browse files Browse the repository at this point in the history
  • Loading branch information
DavZim committed Jan 10, 2024
1 parent 971df48 commit e3719b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/filter_itch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ void filter_itch_impl(std::string infile, std::string outfile,
}

if (!quiet) {
Rprintf("[Bytes] scanned %lld, filtered %lld\n",
Rprintf("[Bytes] scanned %ld, filtered %ld\n",
filesize, bytes_written + o);
Rprintf("[Messages] scanned %lld, filtered %lld\n",
Rprintf("[Messages] scanned %ld, filtered %ld\n",
msg_count, msg_read);
}

Expand Down
2 changes: 1 addition & 1 deletion src/helper_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ uint64_t set8bytes(unsigned char* b, int64_t val) {
// i.e., "UFO" with 8 to 0x55534f2020202020 (filled with whitespaces)
uint64_t setCharBytes(unsigned char* b, std::string x, uint64_t n) {
unsigned char *st = new unsigned char[n + 1];
if (x.size() > n) Rprintf("ERROR: setChar Bytes for string '%s' larger than capacity %i\n", x.c_str(), n);
if (x.size() > n) Rprintf("ERROR: setChar Bytes for string '%s' larger than capacity %lu\n", x.c_str(), n);
for (uint64_t j = 0; j < n; j++) st[j] = ' '; // fill with n spaces
for (uint64_t j = 0; j < x.size(); j++) st[j] = x[j]; // copy the string x
memcpy(b, st, n);
Expand Down

0 comments on commit e3719b2

Please sign in to comment.