All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, 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>
Subject: Re: [PATCH 3/6] tools/virtiofsd: add G_GNUC_PRINTF for logging functions
Date: Wed, 4 Jan 2023 19:46:56 +0000	[thread overview]
Message-ID: <Y7XXsHEqgTG9Ani6@work-vm> (raw)
In-Reply-To: <20221219130205.687815-4-berrange@redhat.com>

* Daniel P. Berrangé (berrange@redhat.com) wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Yes, although I'm a little surprised this hasn't thrown up any warnings.


Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  tools/virtiofsd/fuse_log.c       | 1 +
>  tools/virtiofsd/fuse_log.h       | 6 ++++--
>  tools/virtiofsd/passthrough_ll.c | 1 +
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/virtiofsd/fuse_log.c b/tools/virtiofsd/fuse_log.c
> index 745d88cd2a..2de3f48ee7 100644
> --- a/tools/virtiofsd/fuse_log.c
> +++ b/tools/virtiofsd/fuse_log.c
> @@ -12,6 +12,7 @@
>  #include "fuse_log.h"
>  
>  
> +G_GNUC_PRINTF(2, 0)
>  static void default_log_func(__attribute__((unused)) enum fuse_log_level level,
>                               const char *fmt, va_list ap)
>  {
> diff --git a/tools/virtiofsd/fuse_log.h b/tools/virtiofsd/fuse_log.h
> index 8d7091bd4d..e5c2967ab9 100644
> --- a/tools/virtiofsd/fuse_log.h
> +++ b/tools/virtiofsd/fuse_log.h
> @@ -45,7 +45,8 @@ enum fuse_log_level {
>   * @param ap format string arguments
>   */
>  typedef void (*fuse_log_func_t)(enum fuse_log_level level, const char *fmt,
> -                                va_list ap);
> +                                va_list ap)
> +    G_GNUC_PRINTF(2, 0);
>  
>  /**
>   * Install a custom log handler function.
> @@ -68,6 +69,7 @@ void fuse_set_log_func(fuse_log_func_t func);
>   * @param level severity level (FUSE_LOG_ERR, FUSE_LOG_DEBUG, etc)
>   * @param fmt sprintf-style format string including newline
>   */
> -void fuse_log(enum fuse_log_level level, const char *fmt, ...);
> +void fuse_log(enum fuse_log_level level, const char *fmt, ...)
> +    G_GNUC_PRINTF(2, 3);
>  
>  #endif /* FUSE_LOG_H_ */
> diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
> index 20f0f41f99..40ea2ed27f 100644
> --- a/tools/virtiofsd/passthrough_ll.c
> +++ b/tools/virtiofsd/passthrough_ll.c
> @@ -4182,6 +4182,7 @@ static void setup_nofile_rlimit(unsigned long rlimit_nofile)
>      }
>  }
>  
> +G_GNUC_PRINTF(2, 0)
>  static void log_func(enum fuse_log_level level, const char *fmt, va_list ap)
>  {
>      g_autofree char *localfmt = NULL;
> -- 
> 2.38.1
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

WARNING: multiple messages have this Message-ID (diff)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, 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>
Subject: Re: [Virtio-fs] [PATCH 3/6] tools/virtiofsd: add G_GNUC_PRINTF for logging functions
Date: Wed, 4 Jan 2023 19:46:56 +0000	[thread overview]
Message-ID: <Y7XXsHEqgTG9Ani6@work-vm> (raw)
In-Reply-To: <20221219130205.687815-4-berrange@redhat.com>

* Daniel P. Berrangé (berrange@redhat.com) wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Yes, although I'm a little surprised this hasn't thrown up any warnings.


Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  tools/virtiofsd/fuse_log.c       | 1 +
>  tools/virtiofsd/fuse_log.h       | 6 ++++--
>  tools/virtiofsd/passthrough_ll.c | 1 +
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/virtiofsd/fuse_log.c b/tools/virtiofsd/fuse_log.c
> index 745d88cd2a..2de3f48ee7 100644
> --- a/tools/virtiofsd/fuse_log.c
> +++ b/tools/virtiofsd/fuse_log.c
> @@ -12,6 +12,7 @@
>  #include "fuse_log.h"
>  
>  
> +G_GNUC_PRINTF(2, 0)
>  static void default_log_func(__attribute__((unused)) enum fuse_log_level level,
>                               const char *fmt, va_list ap)
>  {
> diff --git a/tools/virtiofsd/fuse_log.h b/tools/virtiofsd/fuse_log.h
> index 8d7091bd4d..e5c2967ab9 100644
> --- a/tools/virtiofsd/fuse_log.h
> +++ b/tools/virtiofsd/fuse_log.h
> @@ -45,7 +45,8 @@ enum fuse_log_level {
>   * @param ap format string arguments
>   */
>  typedef void (*fuse_log_func_t)(enum fuse_log_level level, const char *fmt,
> -                                va_list ap);
> +                                va_list ap)
> +    G_GNUC_PRINTF(2, 0);
>  
>  /**
>   * Install a custom log handler function.
> @@ -68,6 +69,7 @@ void fuse_set_log_func(fuse_log_func_t func);
>   * @param level severity level (FUSE_LOG_ERR, FUSE_LOG_DEBUG, etc)
>   * @param fmt sprintf-style format string including newline
>   */
> -void fuse_log(enum fuse_log_level level, const char *fmt, ...);
> +void fuse_log(enum fuse_log_level level, const char *fmt, ...)
> +    G_GNUC_PRINTF(2, 3);
>  
>  #endif /* FUSE_LOG_H_ */
> diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
> index 20f0f41f99..40ea2ed27f 100644
> --- a/tools/virtiofsd/passthrough_ll.c
> +++ b/tools/virtiofsd/passthrough_ll.c
> @@ -4182,6 +4182,7 @@ static void setup_nofile_rlimit(unsigned long rlimit_nofile)
>      }
>  }
>  
> +G_GNUC_PRINTF(2, 0)
>  static void log_func(enum fuse_log_level level, const char *fmt, va_list ap)
>  {
>      g_autofree char *localfmt = NULL;
> -- 
> 2.38.1
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


  reply	other threads:[~2023-01-04 19:47 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 ` [PATCH 2/6] hw/xen: use G_GNUC_PRINTF/SCANF for various functions Daniel P. Berrangé
2022-12-19 13:02   ` [Virtio-fs] " 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 [this message]
2023-01-04 19:46     ` 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=Y7XXsHEqgTG9Ani6@work-vm \
    --to=dgilbert@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --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.