Silence warning about loss of precision

Explicitly cast to uintptr_t before casting to a 32-bit value.  Because this
code path is meant to be used in a 32-bit address space, this truncation should
be safe.

Unwind-EHABI.h:25:12: error: cast from pointer to smaller type 'uint32_t' (aka 'unsigned int') loses information

llvm-svn: 228357
This commit is contained in:
Saleem Abdulrasool 2015-02-05 23:27:36 +00:00
parent bb66601d7c
commit ee0639d37e
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ static inline uint32_t signExtendPrel31(uint32_t data) {
}
static inline uint32_t readPrel31(const uint32_t *data) {
return (((uint32_t) data) + signExtendPrel31(*data));
return (((uint32_t)(uintptr_t)data) + signExtendPrel31(*data));
}
#if defined(__cplusplus)