From 84c74ea0823aa14c426bcdcda4a3729d8dfa8454 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 5 Jun 2018 22:10:58 +0200 Subject: [PATCH] vrend: Add #define for unused variables This is required to silence -Wunused-parameter warnings. v2: - Use mesa-style UNUSED for unused parameters - Add it it gallium/aux/os_misc.h instead of util/u_debug.h, here it seems a bit more apropriate Reviewed-by: Gurchetan Singh Signed-off-by: Gert Wollny Signed-off-by: Jakob Bornecrantz --- src/gallium/auxiliary/os/os_misc.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/auxiliary/os/os_misc.h b/src/gallium/auxiliary/os/os_misc.h index 5029ab9..4bb6939 100644 --- a/src/gallium/auxiliary/os/os_misc.h +++ b/src/gallium/auxiliary/os/os_misc.h @@ -43,6 +43,13 @@ # include /* getpid() */ #endif +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#define MAYBE_UNUSED __attribute__((unused)) +#else +#define UNUSED +#define MAYBE_UNUSED +#endif #ifdef __cplusplus extern "C" {