summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2019-01-02 13:02:06 +0000
committerFrediano Ziglio <fziglio@redhat.com>2019-01-02 14:00:23 +0000
commit6dc745e877a12ed25634040dd6fa46fa5de694e2 (patch)
treed017cbd3a000c8605b41ae8981f8adc586d5e163
parent2d32025f77d73778419c2b462906b9a315df0894 (diff)
log: Use proper format attribute for spice_log
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@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-rw-r--r--common/log.h2
1 files changed, 1 insertions, 1 deletions
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 { \