diff mbox

qemu-log: Add GCC format attribute

Message ID 1340476870-7886-1-git-send-email-sw@weilnetz.de
State Accepted
Headers show

Commit Message

Stefan Weil June 23, 2012, 6:41 p.m. UTC
The new inline function qemu_log_vprintf should use this attribute.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 qemu-log.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Blue Swirl June 24, 2012, 12:28 p.m. UTC | #1
Thanks, applied.

On Sat, Jun 23, 2012 at 6:41 PM, Stefan Weil <sw@weilnetz.de> wrote:
> The new inline function qemu_log_vprintf should use this attribute.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  qemu-log.h |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qemu-log.h b/qemu-log.h
> index 40f8b7b..db0f23d 100644
> --- a/qemu-log.h
> +++ b/qemu-log.h
> @@ -51,7 +51,8 @@ void GCC_FMT_ATTR(1, 2) qemu_log(const char *fmt, ...);
>
>  /* vfprintf-like logging function
>  */
> -static inline void qemu_log_vprintf(const char *fmt, va_list va)
> +static inline void GCC_FMT_ATTR(1, 0)
> +qemu_log_vprintf(const char *fmt, va_list va)
>  {
>     if (qemu_logfile) {
>         vfprintf(qemu_logfile, fmt, va);
> --
> 1.7.10
>
diff mbox

Patch

diff --git a/qemu-log.h b/qemu-log.h
index 40f8b7b..db0f23d 100644
--- a/qemu-log.h
+++ b/qemu-log.h
@@ -51,7 +51,8 @@  void GCC_FMT_ATTR(1, 2) qemu_log(const char *fmt, ...);
 
 /* vfprintf-like logging function
  */
-static inline void qemu_log_vprintf(const char *fmt, va_list va)
+static inline void GCC_FMT_ATTR(1, 0)
+qemu_log_vprintf(const char *fmt, va_list va)
 {
     if (qemu_logfile) {
         vfprintf(qemu_logfile, fmt, va);