Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion implementation/routing/src/routing_manager_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <fstream>
#include <forward_list>
#include <thread>
#include <cinttypes>

#if defined(__linux__) || defined(__QNX__)
#include <unistd.h>
Expand Down Expand Up @@ -3914,7 +3915,8 @@ void routing_manager_impl::memory_log_timer_cbk(boost::system::error_code const&
std::uint64_t its_dirtypages(0);

if (EOF
== std::fscanf(its_file, "%lu %lu %lu %lu %lu %lu %lu", &its_size, &its_rsssize, &its_sharedpages, &its_text, &its_lib, &its_data,
== std::fscanf(its_file, "%" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64,
&its_size, &its_rsssize, &its_sharedpages, &its_text, &its_lib, &its_data,
&its_dirtypages)) {
VSOMEIP_ERROR << "memory_log_timer_cbk: error reading: errno " << errno;
}
Expand Down
6 changes: 4 additions & 2 deletions test/network_tests/cpu_load_tests/cpu_load_measurer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <vector>
#include <stdexcept>
#include <cstdio>
#include <cinttypes>

#include <sys/types.h>
#include <unistd.h>
Expand Down Expand Up @@ -86,7 +87,7 @@ std::uint64_t cpu_load_measurer::read_proc_pid_stat() {
std::int64_t cstime(0);
if (std::fscanf(f,
"%*d %*s %*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u "
"%lu %lu %ld %ld", // utime, stime, cutime, cstime
"%" SCNu64 " %" SCNu64 " %" SCNi64 " %" SCNi64, // utime, stime, cutime, cstime
&utime, &stime, &cutime, &cstime)
== EOF) {
std::cerr << "Failed to read " + path << std::endl;
Expand Down Expand Up @@ -116,7 +117,8 @@ std::uint64_t cpu_load_measurer::read_proc_stat(std::uint64_t* _idle) {
std::uint64_t steal(0);
std::uint64_t guest(0);
std::uint64_t guest_nice(0);
if (std::fscanf(f, "%*s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu", &user, &nice, &system, &idle, &iowait, &irq, &softirq, &steal, &guest,
if (std::fscanf(f, "%*s %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64,
&user, &nice, &system, &idle, &iowait, &irq, &softirq, &steal, &guest,
&guest_nice)
== EOF) {
std::cerr << "Failed to read /proc/stat" << std::endl;
Expand Down
4 changes: 3 additions & 1 deletion test/network_tests/memory_tests/memory_test_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <chrono>
#include <iomanip>
#include <cstring>
#include <cinttypes>

#include <vsomeip/internal/logger.hpp>
#include "memory_test_client.hpp"
Expand All @@ -30,7 +31,8 @@ void check_memory(std::vector<std::uint64_t>& test_memory_, std::atomic<bool>& s
std::uint64_t its_dirtypages(0);

if (EOF
== std::fscanf(its_file, "%lu %lu %lu %lu %lu %lu %lu", &its_size, &its_rsssize, &its_sharedpages, &its_text, &its_lib,
== std::fscanf(its_file, "%" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64,
&its_size, &its_rsssize, &its_sharedpages, &its_text, &its_lib,
&its_data, &its_dirtypages)) {
VSOMEIP_ERROR << "check_memory: error reading: errno " << errno;
}
Expand Down
4 changes: 3 additions & 1 deletion test/network_tests/memory_tests/memory_test_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <vsomeip/internal/logger.hpp>
#include <cstring>
#include <cinttypes>

#include "memory_test_service.hpp"

Expand All @@ -28,7 +29,8 @@ void check_memory(std::vector<std::uint64_t>& test_memory_, std::atomic<bool>& s
std::uint64_t its_dirtypages(0);

if (EOF
== std::fscanf(its_file, "%lu %lu %lu %lu %lu %lu %lu", &its_size, &its_rsssize, &its_sharedpages, &its_text, &its_lib,
== std::fscanf(its_file, "%" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64,
&its_size, &its_rsssize, &its_sharedpages, &its_text, &its_lib,
&its_data, &its_dirtypages)) {
VSOMEIP_ERROR << "check_memory: error reading: errno " << errno;
}
Expand Down
Loading