diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-02-20 08:29:17 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-02-20 08:29:17 +0000 |
commit | 4fc8d6711aff7a9c11e402c3d77b481609f9f486 (patch) | |
tree | fa285d986a4be1a5cf2a796a90006e7e13c9b20c /hw | |
parent | 64e69d50a394a48de7607f178d53c192443f9066 (diff) |
Fix warning on mingw32
/src/qemu/hw/ide/core.c: In function 'ide_drive_pre_save':
/src/qemu/hw/ide/core.c:2740: 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 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index 9d687a9d80..2e0971ddeb 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2727,6 +2727,7 @@ static int ide_drive_post_load(void *opaque, int version_id) static void ide_drive_pre_save(void *opaque) { IDEState *s = opaque; + int idx; s->cur_io_buffer_len = 0; @@ -2736,11 +2737,13 @@ static void ide_drive_pre_save(void *opaque) s->cur_io_buffer_offset = s->data_ptr - s->io_buffer; s->cur_io_buffer_len = s->data_end - s->data_ptr; - s->end_transfer_fn_idx = transfer_end_table_idx(s->end_transfer_func); - if (s->end_transfer_fn_idx == -1) { + idx = transfer_end_table_idx(s->end_transfer_func); + if (idx == -1) { fprintf(stderr, "%s: invalid end_transfer_func for DRQ_STAT\n", __func__); s->end_transfer_fn_idx = 2; + } else { + s->end_transfer_fn_idx = idx; } } |