diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-07-27 15:32:39 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-07-27 15:32:39 +0000 |
commit | 7bccf57383cca60a778d5c543ac80c9f62d89ef2 (patch) | |
tree | 72fbace13f3abd6b3a5a8d525924064dbd4a9022 /hw | |
parent | fd2f659ee3f6f991f4f194f3fde5c9f957fd663d (diff) |
Fix uint8_t comparisons with negative values
Fix the following warnings:
/src/qemu/hw/ide/core.c: In function `ide_drive_pio_post_load':
/src/qemu/hw/ide/core.c:2767: warning: comparison is always false due to limited range of data type
/src/qemu/ui/vnc-enc-tight.c: In function `tight_detect_smooth_image':
/src/qemu/ui/vnc-enc-tight.c:284: warning: comparison is always true due to limited range of data type
/src/qemu/ui/vnc-enc-tight.c:297: warning: comparison is always true due to limited range of data type
/src/qemu/ui/vnc-enc-tight.c: In function `tight_encode_indexed_rect16':
/src/qemu/ui/vnc-enc-tight.c:456: warning: comparison is always false due to limited range of data type
/src/qemu/ui/vnc-enc-tight.c: In function `tight_encode_indexed_rect32':
/src/qemu/ui/vnc-enc-tight.c:457: warning: comparison is always false due to limited range of data type
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ide/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index db000831e8..56aed935c9 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2764,8 +2764,7 @@ static int ide_drive_pio_post_load(void *opaque, int version_id) { IDEState *s = opaque; - if (s->end_transfer_fn_idx < 0 || - s->end_transfer_fn_idx > ARRAY_SIZE(transfer_end_table)) { + if (s->end_transfer_fn_idx > ARRAY_SIZE(transfer_end_table)) { return -EINVAL; } s->end_transfer_func = transfer_end_table[s->end_transfer_fn_idx]; |