forked from OSchip/llvm-project
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:
parent
bb66601d7c
commit
ee0639d37e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue