Skip to content

Commit

Permalink
Avoid warning about format string in 32-bit build.
Browse files Browse the repository at this point in the history
warning: format ‘%ld’ expects argument of type ‘long int’...
  • Loading branch information
bernhardu committed Jun 4, 2024
1 parent d971587 commit 9dd5495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StdioMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace rr {
Switchable StdioMonitor::will_write(Task* t) {
if (t->session().mark_stdio()) {
char buf[256];
snprintf(buf, sizeof(buf) - 1, "[rr %d %ld]", t->tgid(), t->trace_time());
snprintf(buf, sizeof(buf) - 1, "[rr %d %" PRId64 "]", t->tgid(), t->trace_time());
ssize_t len = strlen(buf);
if (write(original_fd, buf, len) != len) {
ASSERT(t, false) << "Couldn't write to " << original_fd;
Expand Down

0 comments on commit 9dd5495

Please sign in to comment.