Skip to content

Commit

Permalink
use portable PRIu64 macro instead of %lu for uint64_t (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongyunl authored Jan 8, 2024
1 parent 52ec0c5 commit f71dc71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/ulog_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
****************************************************************************/

#include <algorithm>
#include <cinttypes>
#include <fstream>
#include <iostream>
#include <numeric>
Expand Down Expand Up @@ -108,8 +109,8 @@ int main(int argc, char** argv)
if (logging.hasTag()) {
tag_str = std::to_string(logging.tag()) + " ";
}
printf(" %s<%s> %lu %s\n", tag_str.c_str(), logging.logLevelStr().c_str(), logging.timestamp(),
logging.message().c_str());
printf(" %s<%s> %" PRIu64 " %s\n", tag_str.c_str(), logging.logLevelStr().c_str(),
logging.timestamp(), logging.message().c_str());
}

// Params (init, after, defaults)
Expand Down

0 comments on commit f71dc71

Please sign in to comment.