Commit 425be425f65771d9e45e5ea889b997e003afb705
1 parent
bba831e8
Avoid implicit truncation compiler warnings
Signed-off-by: Paul Brook <paul@codesourcery.com>
Showing
1 changed file
with
2 additions
and
2 deletions
linux-user/qemu.h
... | ... | @@ -262,10 +262,10 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size) |
262 | 262 | *(uint8_t *)(hptr) = (uint8_t)(typeof(*hptr))(x);\ |
263 | 263 | break;\ |
264 | 264 | case 2:\ |
265 | - *(uint16_t *)(hptr) = tswap16((typeof(*hptr))(x));\ | |
265 | + *(uint16_t *)(hptr) = tswap16((uint16_t)(typeof(*hptr))(x));\ | |
266 | 266 | break;\ |
267 | 267 | case 4:\ |
268 | - *(uint32_t *)(hptr) = tswap32((typeof(*hptr))(x));\ | |
268 | + *(uint32_t *)(hptr) = tswap32((uint32_t)(typeof(*hptr))(x));\ | |
269 | 269 | break;\ |
270 | 270 | case 8:\ |
271 | 271 | *(uint64_t *)(hptr) = tswap64((typeof(*hptr))(x));\ | ... | ... |