[Mesa-dev] [PATCH 19/23] src/util/simple_mtx.h: Fix two -Wunused-param warnings.

Gert Wollny gw.fossdev at gmail.com
Sun Nov 12 13:55:51 UTC 2017


Decorate the parameters accordingly with "UNUSED" or "MAYBE_UNUSED" (for
the param that is used in debug mode, but not in release mode).
---
 src/util/simple_mtx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/simple_mtx.h b/src/util/simple_mtx.h
index cd24b6f9eb..ed7f657a9d 100644
--- a/src/util/simple_mtx.h
+++ b/src/util/simple_mtx.h
@@ -61,7 +61,7 @@ typedef struct {
 #define _SIMPLE_MTX_INITIALIZER_NP { 0 }
 
 static inline void
-simple_mtx_init(simple_mtx_t *mtx, int type)
+simple_mtx_init(simple_mtx_t *mtx, int type MAYBE_UNUSED)
 {
    assert(type == mtx_plain);
 
@@ -69,7 +69,7 @@ simple_mtx_init(simple_mtx_t *mtx, int type)
 }
 
 static inline void
-simple_mtx_destroy(simple_mtx_t *mtx)
+simple_mtx_destroy(simple_mtx_t *mtx UNUSED)
 {
 }
 
-- 
2.13.6



More information about the mesa-dev mailing list