Fix reading memory maps

- use correct specifier to sscanf to read uint64_t values

Change-Id: I12c7c062794dc7e57f3cd9eb7b325e471396ceb6
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-08-03 11:33:43 +02:00
committed by sys_ocldev
parent d4379b65b2
commit e8246a8179

View File

@@ -9,7 +9,9 @@
#include "shared/source/os_interface/linux/os_inc.h"
#include <cinttypes>
#include <fstream>
#include <string>
namespace NEO {
@@ -53,7 +55,7 @@ void OSMemoryLinux::getMemoryMaps(MemoryMaps &memoryMaps) {
std::string line;
while (std::getline(ifs, line)) {
uint64_t start = 0, end = 0;
sscanf(line.c_str(), "%lx-%lx", &start, &end);
sscanf(line.c_str(), "%" SCNx64 "-%" SCNx64, &start, &end);
memoryMaps.push_back({start, end});
}
}