From: Alex Sharp <alex.sharp@orionvm.com>
To: xen-devel@lists.xen.org
Cc: Alex Sharp <alex.sharp@orionvm.com>
Subject: [PATCH] Fix various format string mismatches.
Date: Thu, 31 Oct 2013 13:57:27 -0400 [thread overview]
Message-ID: <1383242247-12194-1-git-send-email-alex.sharp@orionvm.com> (raw)
Signed-off-by: Alex Sharp <alex.sharp@orionvm.com>
---
| 4 ++--
| 2 +-
| 5 +++--
3 files changed, 6 insertions(+), 5 deletions(-)
--git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c
index a276193..3c618b0 100644
--- a/extras/mini-os/fbfront.c
+++ b/extras/mini-os/fbfront.c
@@ -105,7 +105,7 @@ again:
free(err);
}
- err = xenbus_printf(xbt, nodename, "page-ref","%u", virt_to_mfn(s));
+ err = xenbus_printf(xbt, nodename, "page-ref","%lu", virt_to_mfn(s));
if (err) {
message = "writing page-ref";
goto abort_transaction;
@@ -468,7 +468,7 @@ again:
free(err);
}
- err = xenbus_printf(xbt, nodename, "page-ref","%u", virt_to_mfn(s));
+ err = xenbus_printf(xbt, nodename, "page-ref","%lu", virt_to_mfn(s));
if (err) {
message = "writing page-ref";
goto abort_transaction;
--git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c
index 7838021..c3d833e 100644
--- a/extras/mini-os/pcifront.c
+++ b/extras/mini-os/pcifront.c
@@ -424,7 +424,7 @@ int pcifront_physical_to_virtual (struct pcifront_dev *dev,
continue;
}
- if (sscanf(s, "%x:%x:%x.%x", dom, bus, slot, fun) != 4) {
+ if (sscanf(s, "%x:%x:%x.%lx", dom, bus, slot, fun) != 4) {
printk("\"%s\" does not look like a PCI device address\n", s);
free(s);
continue;
--git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.c
index ee1691b..717bba9 100644
--- a/extras/mini-os/xenbus/xenbus.c
+++ b/extras/mini-os/xenbus/xenbus.c
@@ -27,6 +27,7 @@
#include <xen/io/xs_wire.h>
#include <mini-os/spinlock.h>
#include <mini-os/xmalloc.h>
+#include <inttypes.h>
#define min(x,y) ({ \
typeof(x) tmpx = (x); \
@@ -672,7 +673,7 @@ char *xenbus_transaction_start(xenbus_transaction_t *xbt)
err = errmsg(rep);
if (err)
return err;
- sscanf((char *)(rep + 1), "%u", xbt);
+ sscanf((char *)(rep + 1), "%lu", xbt);
free(rep);
return NULL;
}
@@ -769,7 +770,7 @@ domid_t xenbus_get_self_id(void)
domid_t ret;
BUG_ON(xenbus_read(XBT_NIL, "domid", &dom_id));
- sscanf(dom_id, "%d", &ret);
+ sscanf(dom_id, "%"SCNd16, &ret);
return ret;
}
--
1.8.3.2
next reply other threads:[~2013-10-31 17:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 17:57 Alex Sharp [this message]
2013-10-31 18:01 ` [PATCH] Fix various format string mismatches Andrew Cooper
2013-10-31 18:05 ` Andrew Cooper
2013-10-31 18:14 ` Alex Sharp
2013-10-31 18:19 ` Andrew Cooper
2013-11-19 12:27 ` Ian Campbell
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=1383242247-12194-1-git-send-email-alex.sharp@orionvm.com \
--to=alex.sharp@orionvm.com \
--cc=xen-devel@lists.xen.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).