blob: da63b22a271d3c80bd6950a62fa0ca6733d3ad76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
Upstream: Yes
Reason: Fix compilation with -Werror=suggest-attribute=format
From e83bf8a33f720050c7f1ec5f00530fafd5af5698 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Fri, 1 May 2020 11:18:28 +0200
Subject: [PATCH] log: use printf attribute for log fallback
Fixes #233
---
spa/include/spa/support/log.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spa/include/spa/support/log.h b/spa/include/spa/support/log.h
index c97cc8e5..51b3e741 100644
--- a/spa/include/spa/support/log.h
+++ b/spa/include/spa/support/log.h
@@ -139,7 +139,7 @@ struct spa_log_methods {
#else
#define SPA_LOG_FUNC(name,lev) \
-static inline void spa_log_##name (struct spa_log *l, const char *format, ...) \
+static inline SPA_PRINTF_FUNC(2,3) void spa_log_##name (struct spa_log *l, const char *format, ...) \
{ \
if (SPA_UNLIKELY(spa_log_level_enabled(l, lev))) { \
va_list varargs; \
--
2.26.2
|