[CRIU] [PATCH 07/11] x86: Add explicit type conversion for encode/decode pointer
Cyrill Gorcunov
gorcunov at openvz.org
Wed Apr 22 10:20:02 PDT 2015
Eliminate warning on 32bit builds.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
arch/x86/include/asm/types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index abd702c7d26a..774990a2ac52 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -130,7 +130,7 @@ typedef u32 tls_t;
typedef UserX86RegsEntry UserRegsEntry;
-static inline u64 encode_pointer(void *p) { return (u64)p; }
-static inline void *decode_pointer(u64 v) { return (void*)v; }
+static inline u64 encode_pointer(void *p) { return (u64)(long)p; }
+static inline void *decode_pointer(u64 v) { return (void*)(long)v; }
#endif /* __CR_ASM_TYPES_H__ */
--
2.1.0
More information about the CRIU
mailing list