summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <github@ffrnk.de>2023-05-02 18:07:19 +0200
committerGitHub <noreply@github.com>2023-05-02 17:07:19 +0100
commit98eab47b26fe2f4b3a8680b013a5f3c7c04c81ab (patch)
treef428072fe1f70a83f18818cb945b4705ef8c2635
parent83befe5ffb2fbed34ecbf30ecf43fb24e03e5990 (diff)
downloadvSomeIP-maintain/3.1.tar.gz
Fix format specifier in memory_log_timer_cbk (#438)maintain/3.1
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 07c0740..44fff20 100644
--- a/implementation/routing/src/routing_manager_impl.cpp
+++ b/implementation/routing/src/routing_manager_impl.cpp
@@ -13,6 +13,7 @@
#include <unistd.h>
#include <cstdio>
#include <time.h>
+#include <inttypes.h>
#endif
#include <boost/asio/steady_timer.hpp>
@@ -4159,7 +4160,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:"