From 2e618321f13ca2e22c213e31459ba9d2d885080e Mon Sep 17 00:00:00 2001 From: martell <martellmalone@gmail.com> Date: Mon, 8 Dec 2014 18:11:37 +0000 Subject: [PATCH] use size_t for void pointer cast --- interpreter/cling/include/cling/Interpreter/Value.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/interpreter/cling/include/cling/Interpreter/Value.h b/interpreter/cling/include/cling/Interpreter/Value.h index 4ebc32aec4c..22b28fda855 100644 --- a/interpreter/cling/include/cling/Interpreter/Value.h +++ b/interpreter/cling/include/cling/Interpreter/Value.h @@ -10,6 +10,8 @@ #ifndef CLING_VALUE_H #define CLING_VALUE_H +#include <stddef.h> + namespace llvm { class raw_ostream; } @@ -101,7 +103,7 @@ namespace cling { case kLongDoubleType: return (T) V.getAs<long double>(); case kPointerType: - return (T) (unsigned long) V.getAs<void*>(); + return (T) (size_t) V.getAs<void*>(); case kUnsupportedType: V.AssertOnUnsupportedTypeCast(); } @@ -115,7 +117,7 @@ namespace cling { EStorageType storageType = V.getStorageType(); switch (storageType) { case kPointerType: - return (T*) (unsigned long) V.getAs<void*>(); + return (T*) (size_t) V.getAs<void*>(); default: V.AssertOnUnsupportedTypeCast(); break; } -- GitLab