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>
This commit is contained in:
parent
64e69d50a3
commit
4fc8d6711a
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user