From: Wei Liu <wei.liu2@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Ian Jackson <ian.jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH v3 for-4.7 10/16] libxl: add the printf-like attributes to a couple of functions
Date: Wed, 27 Apr 2016 12:25:35 +0100 [thread overview]
Message-ID: <20160427112535.GF20763@citrix.com> (raw)
In-Reply-To: <1461755514-23754-11-git-send-email-roger.pau@citrix.com>
On Wed, Apr 27, 2016 at 01:11:48PM +0200, Roger Pau Monne wrote:
> Or else clang complains with:
>
> error: format string is not a string literal
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> tools/libxl/libxl_internal.h | 4 ++--
> tools/libxl/libxl_save_helper.c | 1 +
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index 8e2cf3e..662d01a 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -636,7 +636,7 @@ _hidden void *libxl__realloc(libxl__gc *gc_opt, void *ptr, size_t new_size) NN1;
> /* print @fmt into an allocated string large enoughto contain the result.
> * (similar to gc'd asprintf(3)). */
> _hidden char *libxl__sprintf(libxl__gc *gc_opt, const char *fmt, ...) PRINTF_ATTRIBUTE(2, 3) NN1;
> -_hidden char *libxl__vsprintf(libxl__gc *gc, const char *format, va_list ap);
> +_hidden char *libxl__vsprintf(libxl__gc *gc, const char *format, va_list ap) PRINTF_ATTRIBUTE(2, 0);
> /* duplicate the string @c (similar to a gc'd strdup(3)). */
> _hidden char *libxl__strdup(libxl__gc *gc_opt,
> const char *c /* may be NULL */) NN1;
> @@ -709,7 +709,7 @@ _hidden char *libxl__xs_libxl_path(libxl__gc *gc, uint32_t domid);
> */
>
> int libxl__xs_vprintf(libxl__gc *gc, xs_transaction_t t,
> - const char *path, const char *fmt, va_list ap);
> + const char *path, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(4, 0);
> int libxl__xs_printf(libxl__gc *gc, xs_transaction_t t,
> const char *path, const char *fmt, ...) PRINTF_ATTRIBUTE(4, 5);
>
> diff --git a/tools/libxl/libxl_save_helper.c b/tools/libxl/libxl_save_helper.c
> index 5fe642a..d3def6b 100644
> --- a/tools/libxl/libxl_save_helper.c
> +++ b/tools/libxl/libxl_save_helper.c
> @@ -52,6 +52,7 @@
>
> /*----- logger -----*/
>
> +__attribute__((format(printf, 5, 0)))
> static void tellparent_vmessage(xentoollog_logger *logger_in,
> xentoollog_level level,
> int errnoval,
> --
> 2.6.4 (Apple Git-63)
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-27 11:24 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 11:11 [PATCH v3 for-4.7 00/16] Fixes for compiling with clang Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 01/16] build: make HOSTCC conditional on the value of clang Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 02/16] build: set HOSTCXX based on clang value for Kconfig xconfig target Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 03/16] build: pass HOST{CC/CXX} value down to Kconfig Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 04/16] build: remove Kconfig forced gcc selection Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 05/16] tools/headers: prevent adding two __align8__ to uint64_t in ARM headers Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 06/16] xen/tools: fix substitution of __align8__ uint64_t inside of headers Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 07/16] libxc: fix usage of uninitialized variable Roger Pau Monne
2016-04-27 11:22 ` Wei Liu
2016-04-27 13:18 ` Wei Liu
2016-04-28 17:43 ` Ian Jackson
2016-05-09 17:10 ` Ian Jackson
2016-04-27 11:11 ` [PATCH v3 for-4.7 08/16] libxl: fix shutdown_reason type in list_domains Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 09/16] xl: fix usage of libxl_get_scheduler Roger Pau Monne
2016-04-27 11:24 ` Wei Liu
2016-04-27 11:11 ` [PATCH v3 for-4.7 10/16] libxl: add the printf-like attributes to a couple of functions Roger Pau Monne
2016-04-27 11:25 ` Wei Liu [this message]
2016-04-27 11:11 ` [PATCH v3 for-4.7 11/16] libxl: convert libxl__device_model_xs_path to a macro Roger Pau Monne
2016-04-27 11:26 ` Wei Liu
2016-04-27 11:11 ` [PATCH v3 for-4.7 12/16] libxl: add explicit casts from yajl_gen_status to yajl_status Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 13/16] libxl: fix passing the type argument to xc_psr_* Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 14/16] oxenstored: fix error when shifting negative value Roger Pau Monne
2016-04-27 11:26 ` Wei Liu
2016-04-27 11:11 ` [PATCH v3 for-4.7 15/16] tools/python: corrently use LDFLAGS and CFLAGS Roger Pau Monne
2016-04-27 11:11 ` [PATCH v3 for-4.7 16/16] tools/pygrub: fix usage of LDFLAGS Roger Pau Monne
2016-04-27 11:27 ` Wei Liu
2016-04-27 13:23 ` [PATCH v3 for-4.7 00/16] Fixes for compiling with clang Wei Liu
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=20160427112535.GF20763@citrix.com \
--to=wei.liu2@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=roger.pau@citrix.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.