about summary refs log tree commit diff homepage
path: root/lib/Core/MemoryManager.cpp
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2016-12-19 12:08:36 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2016-12-19 12:09:23 +0000
commit339b87f9da680e93e7e38b1522486953a3ff3a4f (patch)
treeaeaadd1f0d7b809a6879eb95a32892180b6c44fa /lib/Core/MemoryManager.cpp
parent48d0feb983232250b42785c04fc87251d436f4d3 (diff)
downloadklee-339b87f9da680e93e7e38b1522486953a3ff3a4f.tar.gz
Fix -Wformat warnings emitted by Apple Clang (800.0.42.1).
Diffstat (limited to 'lib/Core/MemoryManager.cpp')
-rw-r--r--lib/Core/MemoryManager.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Core/MemoryManager.cpp b/lib/Core/MemoryManager.cpp
index f9f4b105..24e2ed97 100644
--- a/lib/Core/MemoryManager.cpp
+++ b/lib/Core/MemoryManager.cpp
@@ -17,7 +17,9 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/MathExtras.h"
 
+#include <inttypes.h>
 #include <sys/mman.h>
+
 using namespace klee;
 
 namespace {
@@ -94,7 +96,8 @@ MemoryObject *MemoryManager::allocate(uint64_t size, bool isLocal,
                                       const llvm::Value *allocSite,
                                       size_t alignment) {
   if (size > 10 * 1024 * 1024)
-    klee_warning_once(0, "Large alloc: %lu bytes.  KLEE may run out of memory.",
+    klee_warning_once(0, "Large alloc: %" PRIu64
+                         " bytes.  KLEE may run out of memory.",
                       size);
 
   // Return NULL if size is zero, this is equal to error during allocation
@@ -118,10 +121,9 @@ MemoryObject *MemoryManager::allocate(uint64_t size, bool isLocal,
     if ((char *)address + alloc_size < deterministicSpace + spaceSize) {
       nextFreeSlot = (char *)address + alloc_size + RedZoneSpace;
     } else {
-      klee_warning_once(
-          0,
-          "Couldn't allocate %lu bytes. Not enough deterministic space left.",
-          size);
+      klee_warning_once(0, "Couldn't allocate %" PRIu64
+                           " bytes. Not enough deterministic space left.",
+                        size);
       address = 0;
     }
   } else {