All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-ppc@nongnu.org, xen-devel@lists.xenproject.org,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	virtio-fs@redhat.com, "Michael Roth" <michael.roth@amd.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	qemu-block@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, "Paul Durrant" <paul@xen.org>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Cédric Le Goater" <clg@kaod.org>, "John Snow" <jsnow@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>, "Greg Kurz" <groug@kaod.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH 2/6] hw/xen: use G_GNUC_PRINTF/SCANF for various functions
Date: Mon, 19 Dec 2022 08:02:01 -0500	[thread overview]
Message-ID: <20221219130205.687815-3-berrange@redhat.com> (raw)
In-Reply-To: <20221219130205.687815-1-berrange@redhat.com>

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hw/xen/xen-bus.c                | 1 +
 hw/xen/xen_pvdev.c              | 1 +
 include/hw/xen/xen-bus-helper.h | 6 ++++--
 include/hw/xen/xen-bus.h        | 3 ++-
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c
index 645a29a5a0..df3f6b9ae0 100644
--- a/hw/xen/xen-bus.c
+++ b/hw/xen/xen-bus.c
@@ -561,6 +561,7 @@ void xen_device_backend_printf(XenDevice *xendev, const char *key,
     }
 }
 
+G_GNUC_SCANF(3, 4)
 static int xen_device_backend_scanf(XenDevice *xendev, const char *key,
                                     const char *fmt, ...)
 {
diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c
index 037152f063..1a5177b354 100644
--- a/hw/xen/xen_pvdev.c
+++ b/hw/xen/xen_pvdev.c
@@ -196,6 +196,7 @@ const char *xenbus_strstate(enum xenbus_state state)
  *  2 == noisy debug messages (logfile only).
  *  3 == will flood your log (logfile only).
  */
+G_GNUC_PRINTF(3, 0)
 static void xen_pv_output_msg(struct XenLegacyDevice *xendev,
                               FILE *f, const char *fmt, va_list args)
 {
diff --git a/include/hw/xen/xen-bus-helper.h b/include/hw/xen/xen-bus-helper.h
index 629a904d1a..8782f30550 100644
--- a/include/hw/xen/xen-bus-helper.h
+++ b/include/hw/xen/xen-bus-helper.h
@@ -31,10 +31,12 @@ void xs_node_printf(struct xs_handle *xsh,  xs_transaction_t tid,
 /* Read from node/key unless node is empty, in which case read from key */
 int xs_node_vscanf(struct xs_handle *xsh,  xs_transaction_t tid,
                    const char *node, const char *key, Error **errp,
-                   const char *fmt, va_list ap);
+                   const char *fmt, va_list ap)
+    G_GNUC_SCANF(6, 0);
 int xs_node_scanf(struct xs_handle *xsh,  xs_transaction_t tid,
                   const char *node, const char *key, Error **errp,
-                  const char *fmt, ...);
+                  const char *fmt, ...)
+    G_GNUC_SCANF(6, 7);
 
 /* Watch node/key unless node is empty, in which case watch key */
 void xs_node_watch(struct xs_handle *xsh, const char *node, const char *key,
diff --git a/include/hw/xen/xen-bus.h b/include/hw/xen/xen-bus.h
index 713e763348..4d966a2dbb 100644
--- a/include/hw/xen/xen-bus.h
+++ b/include/hw/xen/xen-bus.h
@@ -94,7 +94,8 @@ void xen_device_frontend_printf(XenDevice *xendev, const char *key,
     G_GNUC_PRINTF(3, 4);
 
 int xen_device_frontend_scanf(XenDevice *xendev, const char *key,
-                              const char *fmt, ...);
+                              const char *fmt, ...)
+    G_GNUC_SCANF(3, 4);
 
 void xen_device_set_max_grant_refs(XenDevice *xendev, unsigned int nr_refs,
                                    Error **errp);
-- 
2.38.1

WARNING: multiple messages have this Message-ID (diff)
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-ppc@nongnu.org, xen-devel@lists.xenproject.org,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	virtio-fs@redhat.com, "Michael Roth" <michael.roth@amd.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	qemu-block@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, "Paul Durrant" <paul@xen.org>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Cédric Le Goater" <clg@kaod.org>, "John Snow" <jsnow@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>, "Greg Kurz" <groug@kaod.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [Virtio-fs] [PATCH 2/6] hw/xen: use G_GNUC_PRINTF/SCANF for various functions
Date: Mon, 19 Dec 2022 08:02:01 -0500	[thread overview]
Message-ID: <20221219130205.687815-3-berrange@redhat.com> (raw)
In-Reply-To: <20221219130205.687815-1-berrange@redhat.com>

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hw/xen/xen-bus.c                | 1 +
 hw/xen/xen_pvdev.c              | 1 +
 include/hw/xen/xen-bus-helper.h | 6 ++++--
 include/hw/xen/xen-bus.h        | 3 ++-
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c
index 645a29a5a0..df3f6b9ae0 100644
--- a/hw/xen/xen-bus.c
+++ b/hw/xen/xen-bus.c
@@ -561,6 +561,7 @@ void xen_device_backend_printf(XenDevice *xendev, const char *key,
     }
 }
 
+G_GNUC_SCANF(3, 4)
 static int xen_device_backend_scanf(XenDevice *xendev, const char *key,
                                     const char *fmt, ...)
 {
diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c
index 037152f063..1a5177b354 100644
--- a/hw/xen/xen_pvdev.c
+++ b/hw/xen/xen_pvdev.c
@@ -196,6 +196,7 @@ const char *xenbus_strstate(enum xenbus_state state)
  *  2 == noisy debug messages (logfile only).
  *  3 == will flood your log (logfile only).
  */
+G_GNUC_PRINTF(3, 0)
 static void xen_pv_output_msg(struct XenLegacyDevice *xendev,
                               FILE *f, const char *fmt, va_list args)
 {
diff --git a/include/hw/xen/xen-bus-helper.h b/include/hw/xen/xen-bus-helper.h
index 629a904d1a..8782f30550 100644
--- a/include/hw/xen/xen-bus-helper.h
+++ b/include/hw/xen/xen-bus-helper.h
@@ -31,10 +31,12 @@ void xs_node_printf(struct xs_handle *xsh,  xs_transaction_t tid,
 /* Read from node/key unless node is empty, in which case read from key */
 int xs_node_vscanf(struct xs_handle *xsh,  xs_transaction_t tid,
                    const char *node, const char *key, Error **errp,
-                   const char *fmt, va_list ap);
+                   const char *fmt, va_list ap)
+    G_GNUC_SCANF(6, 0);
 int xs_node_scanf(struct xs_handle *xsh,  xs_transaction_t tid,
                   const char *node, const char *key, Error **errp,
-                  const char *fmt, ...);
+                  const char *fmt, ...)
+    G_GNUC_SCANF(6, 7);
 
 /* Watch node/key unless node is empty, in which case watch key */
 void xs_node_watch(struct xs_handle *xsh, const char *node, const char *key,
diff --git a/include/hw/xen/xen-bus.h b/include/hw/xen/xen-bus.h
index 713e763348..4d966a2dbb 100644
--- a/include/hw/xen/xen-bus.h
+++ b/include/hw/xen/xen-bus.h
@@ -94,7 +94,8 @@ void xen_device_frontend_printf(XenDevice *xendev, const char *key,
     G_GNUC_PRINTF(3, 4);
 
 int xen_device_frontend_scanf(XenDevice *xendev, const char *key,
-                              const char *fmt, ...);
+                              const char *fmt, ...)
+    G_GNUC_SCANF(3, 4);
 
 void xen_device_set_max_grant_refs(XenDevice *xendev, unsigned int nr_refs,
                                    Error **errp);
-- 
2.38.1


  parent reply	other threads:[~2022-12-19 13:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 13:01 [PATCH 0/6] enforce use of G_GNUC_PRINTF annotations Daniel P. Berrangé
2022-12-19 13:01 ` [Virtio-fs] " Daniel P. Berrangé
2022-12-19 13:02 ` [PATCH 1/6] disas: add G_GNUC_PRINTF to gstring_printf Daniel P. Berrangé
2022-12-19 13:02   ` [Virtio-fs] " Daniel P. Berrangé
2022-12-19 20:43   ` Stefan Weil
2022-12-19 20:43     ` Stefan Weil via
2022-12-19 20:43     ` [Virtio-fs] " Stefan Weil
2022-12-19 13:02 ` Daniel P. Berrangé [this message]
2022-12-19 13:02   ` [Virtio-fs] [PATCH 2/6] hw/xen: use G_GNUC_PRINTF/SCANF for various functions Daniel P. Berrangé
2022-12-19 14:10   ` Anthony PERARD
2022-12-19 14:10     ` Anthony PERARD via
2022-12-19 14:10     ` [Virtio-fs] " Anthony PERARD
2022-12-19 13:02 ` [PATCH 3/6] tools/virtiofsd: add G_GNUC_PRINTF for logging functions Daniel P. Berrangé
2022-12-19 13:02   ` [Virtio-fs] " Daniel P. Berrangé
2023-01-04 19:46   ` Dr. David Alan Gilbert
2023-01-04 19:46     ` [Virtio-fs] " Dr. David Alan Gilbert
2022-12-19 13:02 ` [PATCH 4/6] util/error: add G_GNUC_PRINTF for various functions Daniel P. Berrangé
2022-12-19 13:02   ` [Virtio-fs] " Daniel P. Berrangé
2022-12-19 14:13   ` Philippe Mathieu-Daudé
2022-12-19 14:13     ` [Virtio-fs] " Philippe Mathieu-Daudé
2022-12-29  9:29   ` Thomas Huth
2022-12-29  9:29     ` [Virtio-fs] " Thomas Huth
2022-12-19 13:02 ` [PATCH 5/6] tests: " Daniel P. Berrangé
2022-12-19 13:02   ` [Virtio-fs] " Daniel P. Berrangé
2022-12-29  9:34   ` Thomas Huth
2022-12-29  9:34     ` [Virtio-fs] " Thomas Huth
2023-01-09 11:55     ` Daniel P. Berrangé
2023-01-09 11:55       ` [Virtio-fs] " Daniel P. Berrangé
2022-12-19 13:02 ` [PATCH 6/6] enforce use of G_GNUC_PRINTF attributes Daniel P. Berrangé
2022-12-19 13:02   ` [Virtio-fs] " Daniel P. Berrangé
2022-12-22  8:31 ` [PATCH 0/6] enforce use of G_GNUC_PRINTF annotations Paolo Bonzini
2022-12-22  8:31   ` [Virtio-fs] " Paolo Bonzini

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=20221219130205.687815-3-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=groug@kaod.org \
    --cc=jsnow@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    --cc=virtio-fs@redhat.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.