[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [COMMIT 425be42] Avoid implicit truncation compiler warni
From: |
Anthony Liguori |
Subject: |
[Qemu-commits] [COMMIT 425be42] Avoid implicit truncation compiler warnings |
Date: |
Tue, 19 May 2009 14:44:16 -0000 |
From: Paul Brook <address@hidden>
Signed-off-by: Paul Brook <address@hidden>
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 447caf9..9454e66 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -262,10 +262,10 @@ static inline int access_ok(int type, abi_ulong addr,
abi_ulong size)
*(uint8_t *)(hptr) = (uint8_t)(typeof(*hptr))(x);\
break;\
case 2:\
- *(uint16_t *)(hptr) = tswap16((typeof(*hptr))(x));\
+ *(uint16_t *)(hptr) = tswap16((uint16_t)(typeof(*hptr))(x));\
break;\
case 4:\
- *(uint32_t *)(hptr) = tswap32((typeof(*hptr))(x));\
+ *(uint32_t *)(hptr) = tswap32((uint32_t)(typeof(*hptr))(x));\
break;\
case 8:\
*(uint64_t *)(hptr) = tswap64((typeof(*hptr))(x));\
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [COMMIT 425be42] Avoid implicit truncation compiler warnings,
Anthony Liguori <=