Commit b82a4415 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

x86: Add explicit type conversion for encode/decode pointer

Eliminate warning on 32bit builds.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 05b28b7b
...@@ -126,7 +126,7 @@ typedef u32 tls_t; ...@@ -126,7 +126,7 @@ typedef u32 tls_t;
typedef UserX86RegsEntry UserRegsEntry; typedef UserX86RegsEntry UserRegsEntry;
static inline u64 encode_pointer(void *p) { return (u64)p; } static inline u64 encode_pointer(void *p) { return (u64)(long)p; }
static inline void *decode_pointer(u64 v) { return (void*)v; } static inline void *decode_pointer(u64 v) { return (void*)(long)v; }
#endif /* __CR_ASM_TYPES_H__ */ #endif /* __CR_ASM_TYPES_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment