summaryrefslogtreecommitdiff
path: root/examples/ExceptionDemo
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-08-14 00:31:49 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-08-14 00:31:49 +0000
commit54b3a03538abd629b6e0ec559db6be47d1ccf55f (patch)
tree48dece92faa557817a3196f8bc0ac619c6748563 /examples/ExceptionDemo
parent00c293b052dc6e521be681617b3cf9b87c26e008 (diff)
Fix -Wformat warnings in ExceptionDemo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples/ExceptionDemo')
-rw-r--r--examples/ExceptionDemo/ExceptionDemo.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp
index 75140967fa8..5043a656d4c 100644
--- a/examples/ExceptionDemo/ExceptionDemo.cpp
+++ b/examples/ExceptionDemo/ExceptionDemo.cpp
@@ -77,6 +77,7 @@
#include <sstream>
#include <stdexcept>
+#include <inttypes.h>
#ifndef USE_GLOBAL_STR_CONSTS
#define USE_GLOBAL_STR_CONSTS true
@@ -569,8 +570,8 @@ static bool handleActionValue(int64_t *resultAction,
fprintf(stderr,
"handleActionValue(...): exceptionObject = <%p>, "
"excp = <%p>.\n",
- exceptionObject,
- excp);
+ (void*)exceptionObject,
+ (void*)excp);
#endif
const uint8_t *actionPos = (uint8_t*) actionEntry,
@@ -588,8 +589,8 @@ static bool handleActionValue(int64_t *resultAction,
#ifdef DEBUG
fprintf(stderr,
- "handleActionValue(...):typeOffset: <%lld>, "
- "actionOffset: <%lld>.\n",
+ "handleActionValue(...):typeOffset: <%" PRIi64 ">, "
+ "actionOffset: <%" PRIi64 ">.\n",
typeOffset,
actionOffset);
#endif
@@ -848,7 +849,7 @@ _Unwind_Reason_Code ourPersonality(int version,
#ifdef DEBUG
fprintf(stderr,
"ourPersonality(...):lsda = <%p>.\n",
- lsda);
+ (void*)lsda);
#endif
// The real work of the personality function is captured here
@@ -1694,7 +1695,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
#ifdef DEBUG
fprintf(stderr,
"createStandardUtilityFunctions(...):ourBaseFromUnwindOffset "
- "= %lld, sizeof(struct OurBaseException_t) - "
+ "= %" PRIi64 ", sizeof(struct OurBaseException_t) - "
"sizeof(struct _Unwind_Exception) = %lu.\n",
ourBaseFromUnwindOffset,
sizeof(struct OurBaseException_t) -