tools: io: fix printf portability
The printfs were using actual sizes instead of leveraging %z to deal
with std::size_t.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I7ac731b0458d9501762651bdc9d796f7a6ada620
diff --git a/tools/io.cpp b/tools/io.cpp
index 420dd94..21e7d40 100644
--- a/tools/io.cpp
+++ b/tools/io.cpp
@@ -32,7 +32,7 @@
alignedOffset);
if (devMemMapped == MAP_FAILED)
{
- std::fprintf(stderr, "Failed to mmap at offset: 0x%lx, length: %lu\n",
+ std::fprintf(stderr, "Failed to mmap at offset: 0x%zx, length: %zu\n",
offset, length);
sys->close(devMemFd);
return false;
@@ -72,7 +72,7 @@
if (devMemMapped == MAP_FAILED)
{
- std::fprintf(stderr, "Failed to mmap at offset: 0x%lx, length: %lu\n",
+ std::fprintf(stderr, "Failed to mmap at offset: 0x%zx, length: %zu\n",
offset, length);
sys->close(devMemFd);
return false;