Commit db8baf145dd5f8e0729ab79741fcd9a292b5a322

Authored by malc
1 parent d94888e3

Avoid signedness warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4847 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 12 additions and 14 deletions
hw/gus.c
... ... @@ -222,32 +222,30 @@ int GUS_read_DMA (void *opaque, int nchan, int dma_pos, int dma_len)
222 222  
223 223 static void GUS_save (QEMUFile *f, void *opaque)
224 224 {
225   - int32_t val;
226 225 GUSState *s = opaque;
227 226  
228   - val = s->pos; qemu_put_be32s (f, &val);
229   - val = s->left; qemu_put_be32s (f, &val);
230   - val = s->shift; qemu_put_be32s (f, &val);
231   - val = s->irqs; qemu_put_be32s (f, &val);
232   - val = s->samples; qemu_put_be32s (f, &val);
233   - qemu_put_be64s (f, &s->last_ticks);
  227 + qemu_put_be32 (f, s->pos);
  228 + qemu_put_be32 (f, s->left);
  229 + qemu_put_be32 (f, s->shift);
  230 + qemu_put_be32 (f, s->irqs);
  231 + qemu_put_be32 (f, s->samples);
  232 + qemu_put_be64 (f, s->last_ticks);
234 233 qemu_put_buffer (f, s->himem, sizeof (s->himem));
235 234 }
236 235  
237 236 static int GUS_load (QEMUFile *f, void *opaque, int version_id)
238 237 {
239   - int32_t val;
240 238 GUSState *s = opaque;
241 239  
242 240 if (version_id != 2)
243 241 return -EINVAL;
244 242  
245   - qemu_get_be32s (f, &val); s->pos = val;
246   - qemu_get_be32s (f, &val); s->left = val;
247   - qemu_get_be32s (f, &val); s->shift = val;
248   - qemu_get_be32s (f, &val); s->irqs = val;
249   - qemu_get_be32s (f, &val); s->samples = val;
250   - qemu_get_be64s (f, &s->last_ticks);
  243 + s->pos = qemu_get_be32 (f);
  244 + s->left = qemu_get_be32 (f);
  245 + s->shift = qemu_get_be32 (f);
  246 + s->irqs = qemu_get_be32 (f);
  247 + s->samples = qemu_get_be32 (f);
  248 + s->last_ticks = qemu_get_be64 (f);
251 249 qemu_get_buffer (f, s->himem, sizeof (s->himem));
252 250 return 0;
253 251 }
... ...