From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: vasilis.liaskovitis@profitbricks.com, imammedo@redhat.com,
aliguori@us.ibm.com, Richard Henderson <rth@grit.twiddle.net>,
afaerber@suse.de
Subject: [Qemu-devel] [PATCH 1/2] qdev: Fix 32-bit compilation in print_size
Date: Tue, 30 Jul 2013 08:18:33 -1000 [thread overview]
Message-ID: <1375208314-17233-2-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1375208314-17233-1-git-send-email-rth@twiddle.net>
From: Richard Henderson <rth@grit.twiddle.net>
Signed-off-by: Richard Henderson <rth@grit.twiddle.net>
---
hw/core/qdev-properties.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 8d43a8d..d6d10c9 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -1177,7 +1177,7 @@ static int print_size(DeviceState *dev, Property *prop, char *dest, size_t len)
int i = 0;
uint64_t div;
- for (div = (long int)1 << 40; !(*ptr / div) ; div >>= 10) {
+ for (div = 1ULL << 40; !(*ptr / div) ; div >>= 10) {
i++;
}
return snprintf(dest, len, "%0.03f%c", (double)*ptr/div, suffixes[i]);
--
1.8.3.1
next prev parent reply other threads:[~2013-07-30 18:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 18:18 [Qemu-devel] [PATCH 0/2] Fix qdev 32-bit compilation Richard Henderson
2013-07-30 18:18 ` Richard Henderson [this message]
2013-07-30 18:18 ` [Qemu-devel] [PATCH 2/2] qdev: Use clz in print_size Richard Henderson
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=1375208314-17233-2-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@grit.twiddle.net \
--cc=vasilis.liaskovitis@profitbricks.com \
/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).