[Spice-devel] [PATCH spice-common] log: Use proper format attribute for spice_log
Christophe Fergeau
cfergeau at redhat.com
Wed Jan 2 13:51:52 UTC 2019
Fine with me,
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
On Wed, Jan 02, 2019 at 01:02:26PM +0000, Frediano Ziglio wrote:
> SPICE_ATTR_PRINTF uses __printf__ format attribute.
> spice_log internally uses g_string_append_vprintf which uses
> G_GNUC_PRINTF attribute.
> G_GNUC_PRINTF can be __printf__ or gnu_printf format which in
> some systems (currently Windows) can be different.
> GLib 2.58 changed G_GNUC_PRINTF on Windows from using __printf__
> attribute to gnu_printf.
> To avoid problems in the future uses G_GNUC_PRINTF instead of
> SPICE_ATTR_PRINTF for spice_log.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> common/log.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/log.h b/common/log.h
> index d352158..7c67e7a 100644
> --- a/common/log.h
> +++ b/common/log.h
> @@ -37,7 +37,7 @@ void spice_log(GLogLevelFlags log_level,
> const char *strloc,
> const char *function,
> const char *format,
> - ...) SPICE_ATTR_PRINTF(4, 5);
> + ...) G_GNUC_PRINTF(4, 5);
>
> #define spice_return_if_fail(x) G_STMT_START { \
> if G_LIKELY(x) { } else { \
> --
> 2.20.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190102/e3a80b1a/attachment.sig>
More information about the Spice-devel
mailing list