From: "Jan Beulich" Subject: [PATCH] linux-2.6.18: add __attribute__((format(printf... where appropriate Date: Fri, 17 Jun 2011 16:23:11 +0100 Message-ID: <4DFB8D7F02000078000480BE@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartE0CC5B4F.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" Cc: joe@perches.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartE0CC5B4F.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline From: Joe Perches Use the compiler to verify printf formats and arguments. Fix fallout. Signed-off-by: Joe Perches Make apply, slightly re-format, and fix more fallout (in blktap). Signed-off-by: Jan Beulcih --- a/drivers/xen/blkback/xenbus.c +++ b/drivers/xen/blkback/xenbus.c @@ -473,7 +473,7 @@ again: =20 err =3D xenbus_switch_state(dev, XenbusStateConnected); if (err) - xenbus_dev_fatal(dev, err, "switching to Connected state", + xenbus_dev_fatal(dev, err, "%s: switching to Connected = state", dev->nodename); =20 return; --- a/drivers/xen/blktap/xenbus.c +++ b/drivers/xen/blktap/xenbus.c @@ -426,7 +426,7 @@ again: =20 err =3D xenbus_switch_state(dev, XenbusStateConnected); if (err) - xenbus_dev_fatal(dev, err, "switching to Connected state", + xenbus_dev_fatal(dev, err, "%s: switching to Connected = state", dev->nodename); =20 return; --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h @@ -276,7 +276,7 @@ enum xenbus_state xenbus_read_driver_sta * formatted message. */ void xenbus_dev_error(struct xenbus_device *dev, int err, const char = *fmt, - ...); + ...) __attribute__((__format__(__printf__, 3, 4))); =20 =20 /*** @@ -285,7 +285,7 @@ void xenbus_dev_error(struct xenbus_devi * closedown of this driver and its peer. */ void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char = *fmt, - ...); + ...) __attribute__((__format__(__printf__, 3, 4))); =20 int xenbus_dev_init(void); =20 --=__PartE0CC5B4F.0__= Content-Type: text/plain; name="xen-xenbus-format-warnings.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xen-xenbus-format-warnings.patch" From: Joe Perches =0ASubject: xen: add __attribute__((form= at(printf... where appropriate=0A=0AUse the compiler to verify printf = formats and arguments.=0A=0AFix fallout.=0A=0ASigned-off-by: Joe Perches = =0A=0AMake apply, slightly re-format, and fix more = fallout (in blktap).=0A=0ASigned-off-by: Jan Beulcih = =0A=0A--- a/drivers/xen/blkback/xenbus.c=0A+++ b/drivers/xen/blkback/xenbus= .c=0A@@ -473,7 +473,7 @@ again:=0A =0A err =3D xenbus_switch_state(dev, = XenbusStateConnected);=0A if (err)=0A- xenbus_dev_fatal(de= v, err, "switching to Connected state",=0A+ xenbus_dev_fatal(de= v, err, "%s: switching to Connected state",=0A = dev->nodename);=0A =0A return;=0A--- a/drivers/xen/blktap/xenbus.c=0A+++ = b/drivers/xen/blktap/xenbus.c=0A@@ -426,7 +426,7 @@ again:=0A =0A = err =3D xenbus_switch_state(dev, XenbusStateConnected);=0A if = (err)=0A- xenbus_dev_fatal(dev, err, "switching to Connected = state",=0A+ xenbus_dev_fatal(dev, err, "%s: switching to = Connected state",=0A dev->nodename);=0A =0A = return;=0A--- a/include/xen/xenbus.h=0A+++ b/include/xen/xenbus.h=0A@@ = -276,7 +276,7 @@ enum xenbus_state xenbus_read_driver_sta=0A * formatted = message.=0A */=0A void xenbus_dev_error(struct xenbus_device *dev, int = err, const char *fmt,=0A- ...);=0A+ ...) = __attribute__((__format__(__printf__, 3, 4)));=0A =0A =0A /***=0A@@ -285,7 = +285,7 @@ void xenbus_dev_error(struct xenbus_devi=0A * closedown of this = driver and its peer.=0A */=0A void xenbus_dev_fatal(struct xenbus_device = *dev, int err, const char *fmt,=0A- ...);=0A+ = ...) __attribute__((__format__(__printf__, 3, 4)));=0A =0A int = xenbus_dev_init(void);=0A =0A --=__PartE0CC5B4F.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartE0CC5B4F.0__=--