qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4847] Avoid signedness warnings
Date: Sat, 05 Jul 2008 13:40:59 +0000	[thread overview]
Message-ID: <E1KF80Z-0005xN-Ik@cvs.savannah.gnu.org> (raw)

Revision: 4847
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4847
Author:   malc
Date:     2008-07-05 13:40:58 +0000 (Sat, 05 Jul 2008)

Log Message:
-----------
Avoid signedness warnings

Modified Paths:
--------------
    trunk/hw/gus.c

Modified: trunk/hw/gus.c
===================================================================
--- trunk/hw/gus.c	2008-07-04 11:53:53 UTC (rev 4846)
+++ trunk/hw/gus.c	2008-07-05 13:40:58 UTC (rev 4847)
@@ -222,32 +222,30 @@
 
 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;
 }

                 reply	other threads:[~2008-07-05 16:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1KF80Z-0005xN-Ik@cvs.savannah.gnu.org \
    --to=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).