diff options
author | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-05 13:40:58 +0000 |
---|---|---|
committer | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-05 13:40:58 +0000 |
commit | db8baf145dd5f8e0729ab79741fcd9a292b5a322 (patch) | |
tree | cf3e3422b3ff759f557d0ccf028d874c9a338ea7 | |
parent | d94888e35b064df49c8059dfe1f67563e011579e (diff) |
Avoid signedness warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4847 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | hw/gus.c | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -222,32 +222,30 @@ int GUS_read_DMA (void *opaque, int nchan, int dma_pos, int dma_len) static void GUS_save (QEMUFile *f, void *opaque) { - int32_t val; GUSState *s = opaque; - val = s->pos; qemu_put_be32s (f, &val); - val = s->left; qemu_put_be32s (f, &val); - val = s->shift; qemu_put_be32s (f, &val); - val = s->irqs; qemu_put_be32s (f, &val); - val = s->samples; qemu_put_be32s (f, &val); - qemu_put_be64s (f, &s->last_ticks); + qemu_put_be32 (f, s->pos); + qemu_put_be32 (f, s->left); + qemu_put_be32 (f, s->shift); + qemu_put_be32 (f, s->irqs); + qemu_put_be32 (f, s->samples); + qemu_put_be64 (f, s->last_ticks); qemu_put_buffer (f, s->himem, sizeof (s->himem)); } static int GUS_load (QEMUFile *f, void *opaque, int version_id) { - int32_t val; GUSState *s = opaque; if (version_id != 2) return -EINVAL; - qemu_get_be32s (f, &val); s->pos = val; - qemu_get_be32s (f, &val); s->left = val; - qemu_get_be32s (f, &val); s->shift = val; - qemu_get_be32s (f, &val); s->irqs = val; - qemu_get_be32s (f, &val); s->samples = val; - qemu_get_be64s (f, &s->last_ticks); + s->pos = qemu_get_be32 (f); + s->left = qemu_get_be32 (f); + s->shift = qemu_get_be32 (f); + s->irqs = qemu_get_be32 (f); + s->samples = qemu_get_be32 (f); + s->last_ticks = qemu_get_be64 (f); qemu_get_buffer (f, s->himem, sizeof (s->himem)); return 0; } |