[virglrenderer-devel] [PATCH v2 11/15] gallium/aux/u_debug_refcnt.h: Annotate unused parameters

Gert Wollny gert.wollny at collabora.com
Tue Jun 5 20:19:59 UTC 2018


Silences:

util/u_inlines.h:38:0,
                 from tgsi/tgsi_text.c:32:
util/u_debug_refcnt.h: In function 'debug_reference':
../../../../src/gallium/auxiliary/util/u_debug_refcnt.h:39:65: warning:
unused parameter 'p' [-Wunused-parameter]
 static inline void debug_reference(const struct pipe_reference* p,
debug_reference_descriptor get_desc, int change)

unused parameter 'get_desc' [-Wunused-parameter]
 static inline void debug_reference(const struct pipe_reference* p,
debug_reference_descriptor get_desc, int change)

unused parameter 'change' [-Wunused-parameter]
 static inline void debug_reference(const struct pipe_reference* p,
debug_reference_descriptor get_desc, int change)

v2: use mesa style UNUSED annotation for unused parameters

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
 src/gallium/auxiliary/util/u_debug_refcnt.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.h b/src/gallium/auxiliary/util/u_debug_refcnt.h
index f054dce..654e436 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.h
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.h
@@ -29,6 +29,7 @@
 
 #include "pipe/p_config.h"
 #include "pipe/p_state.h"
+#include "util/u_debug.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -36,7 +37,9 @@ extern "C" {
 
 typedef void (*debug_reference_descriptor)(char*, const struct pipe_reference*);
 
-static inline void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
+static inline void debug_reference(UNUSED const struct pipe_reference* p,
+                                   UNUSED debug_reference_descriptor get_desc,
+                                   UNUSED  int change)
 {
 }
 
-- 
2.16.4



More information about the virglrenderer-devel mailing list