diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-07 15:46:23 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-07 15:46:23 +0000 |
commit | 9e622b15a3fb4872a1424f2717dc956da18e473d (patch) | |
tree | 6be2b8de8eb5ab97128114bcae2c83e9f0825d70 /hw/ide.c | |
parent | 511d2b140f3ff2f80d14637cdc2f29743a2daa51 (diff) |
Sparse fixes: truncation by cast
Fix Sparse warnings about constant truncation caused by cast
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6737 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ide.c')
-rw-r--r-- | hw/ide.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1210,7 +1210,7 @@ static void ide_atapi_cmd_check_status(IDEState *s) static inline void cpu_to_ube16(uint8_t *buf, int val) { buf[0] = val >> 8; - buf[1] = val; + buf[1] = val & 0xff; } static inline void cpu_to_ube32(uint8_t *buf, unsigned int val) @@ -1218,7 +1218,7 @@ static inline void cpu_to_ube32(uint8_t *buf, unsigned int val) buf[0] = val >> 24; buf[1] = val >> 16; buf[2] = val >> 8; - buf[3] = val; + buf[3] = val & 0xff; } static inline int ube16_to_cpu(const uint8_t *buf) |