mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 22:08:53 +08:00
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:
committed by
sys_ocldev
parent
d4379b65b2
commit
e8246a8179
@@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user