qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Anthony PERARD" <anthony.perard@citrix.com>
Subject: [PULL 10/29] hw/xen: use G_GNUC_PRINTF/SCANF for various functions
Date: Tue, 10 Jan 2023 17:02:14 +0100	[thread overview]
Message-ID: <20230110160233.339771-11-pbonzini@redhat.com> (raw)
In-Reply-To: <20230110160233.339771-1-pbonzini@redhat.com>

From: Daniel P. Berrangé <berrange@redhat.com>

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20221219130205.687815-3-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@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 645a29a5a070..df3f6b9ae00f 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 037152f06350..1a5177b35468 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 629a904d1a86..8782f3055086 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 713e763348f4..4d966a2dbbc1 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:[~2023-01-10 17:26 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 16:02 [PULL 00/29] Misc patches for 2023-01-10 Paolo Bonzini
2023-01-10 16:02 ` [PULL 01/29] configure: fix GLIB_VERSION for cross-compilation Paolo Bonzini
2023-01-10 16:02 ` [PULL 02/29] i386: Emit correct error code for 64-bit IDT entry Paolo Bonzini
2023-01-10 16:02 ` [PULL 03/29] accel: introduce accelerator blocker API Paolo Bonzini
2023-01-10 16:02 ` [PULL 04/29] KVM: keep track of running ioctls Paolo Bonzini
2023-01-10 16:02 ` [PULL 05/29] kvm: Atomic memslot updates Paolo Bonzini
2023-01-10 16:02 ` [PULL 06/29] target/i386: Remove compilation errors when -Werror=maybe-uninitialized Paolo Bonzini
2023-01-10 17:19   ` Eric Auger
2023-01-11  9:18     ` Paolo Bonzini
2023-01-11 10:03   ` Philippe Mathieu-Daudé
2023-01-10 16:02 ` [PULL 07/29] chardev: clean up chardev-parallel.c Paolo Bonzini
2023-01-10 16:02 ` [PULL 08/29] gitlab: remove redundant setting of PKG_CONFIG_PATH Paolo Bonzini
2023-01-10 16:40   ` Daniel P. Berrangé
2023-01-11  9:20     ` Paolo Bonzini
2023-01-11 10:18       ` Philippe Mathieu-Daudé
2023-01-10 16:02 ` [PULL 09/29] disas: add G_GNUC_PRINTF to gstring_printf Paolo Bonzini
2023-01-10 16:02 ` Paolo Bonzini [this message]
2023-01-10 16:02 ` [PULL 11/29] tools/virtiofsd: add G_GNUC_PRINTF for logging functions Paolo Bonzini
2023-01-10 16:02 ` [PULL 12/29] util/error: add G_GNUC_PRINTF for various functions Paolo Bonzini
2023-01-10 16:02 ` [PULL 13/29] tests: " Paolo Bonzini
2023-01-10 16:02 ` [PULL 14/29] enforce use of G_GNUC_PRINTF attributes Paolo Bonzini
2023-01-10 16:02 ` [PULL 15/29] hw/display: avoid creating empty loadable modules Paolo Bonzini
2023-01-10 16:02 ` [PULL 16/29] libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU Paolo Bonzini
2023-01-10 16:02 ` [PULL 17/29] libvhost-user: Replace typeof with __typeof__ Paolo Bonzini
2023-01-10 16:02 ` [PULL 18/29] libvhost-user: Cast rc variable to avoid compiler warning Paolo Bonzini
2023-01-10 16:02 ` [PULL 19/29] libvhost-user: Use unsigned int i for some for-loop iterations Paolo Bonzini
2023-01-10 16:02 ` [PULL 20/29] libvhost-user: Declare uffdio_register early to make it C90 compliant Paolo Bonzini
2023-01-10 16:02 ` [PULL 21/29] libvhost-user: Change dev->postcopy_ufd assignment " Paolo Bonzini
2023-01-10 16:02 ` [PULL 22/29] libvduse: Provide _GNU_SOURCE when compiling outside of QEMU Paolo Bonzini
2023-01-10 16:02 ` [PULL 23/29] libvduse: Switch to unsigned int for inuse field in struct VduseVirtq Paolo Bonzini
2023-01-10 16:02 ` [PULL 24/29] libvduse: Fix assignment in vring_set_avail_event Paolo Bonzini
2023-01-10 16:02 ` [PULL 25/29] libvhost-user: " Paolo Bonzini
2023-01-10 16:02 ` [PULL 26/29] libvhost-user: Add extra compiler warnings Paolo Bonzini
2023-01-10 16:02 ` [PULL 27/29] libvduse: " Paolo Bonzini
2023-01-10 16:02 ` [PULL 28/29] target/i386: fix operand size of unary SSE operations Paolo Bonzini
2023-01-10 16:02 ` [PULL 29/29] configure: remove backwards-compatibility code Paolo Bonzini
2023-01-10 22:07 ` [PULL 00/29] Misc patches for 2023-01-10 Peter Maydell

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=20230110160233.339771-11-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=berrange@redhat.com \
    --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).