summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <github@ffrnk.de>2023-04-14 15:41:14 +0200
committerGitHub <noreply@github.com>2023-04-14 14:41:14 +0100
commit819ca58f1647b6f7244cf98a5bda03aef18d372c (patch)
tree585bf30e9d457aba42a914b8580025f326aeb021
parent331b71e6ea0241f51e80f9ba5c3fbe917c731dba (diff)
downloadvSomeIP-master.tar.gz
Fix format specifier in memory_log_timer_cbk (#429)HEADmaster
Include inttypes to use correct format specifier when running on 32 or 64 bit platforms. Signed-off-by: Florian Frank <github@ffrnk.de>
-rw-r--r--implementation/routing/src/routing_manager_impl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/implementation/routing/src/routing_manager_impl.cpp b/implementation/routing/src/routing_manager_impl.cpp
index 4ebca55..33c8fb2 100644
--- a/implementation/routing/src/routing_manager_impl.cpp
+++ b/implementation/routing/src/routing_manager_impl.cpp
@@ -14,6 +14,7 @@
#include <unistd.h>
#include <cstdio>
#include <time.h>
+#include <inttypes.h>
#endif
#include <boost/asio/steady_timer.hpp>
@@ -4351,7 +4352,7 @@ void routing_manager_impl::memory_log_timer_cbk(
std::uint64_t its_data(0);
std::uint64_t its_dirtypages(0);
- if (EOF == std::fscanf(its_file, "%lu %lu %lu %lu %lu %lu %lu", &its_size,
+ if (EOF == std::fscanf(its_file, "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64, &its_size,
&its_rsssize, &its_sharedpages, &its_text, &its_lib,
&its_data, &its_dirtypages)) {
VSOMEIP_ERROR<< "memory_log_timer_cbk: error reading:"