diff options
author | David Robillard <d@drobilla.net> | 2020-08-13 17:25:39 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-13 17:25:39 +0200 |
commit | 56b8eb22da76b58a60a797994cecb6499e236896 (patch) | |
tree | 38ac10bd2a0465340535397567a150098cc62423 /zix/common.h | |
parent | c64c8bb33042f2e49eea2efb6e4bbff812e955c1 (diff) | |
download | zix-56b8eb22da76b58a60a797994cecb6499e236896.tar.gz zix-56b8eb22da76b58a60a797994cecb6499e236896.tar.bz2 zix-56b8eb22da76b58a60a797994cecb6499e236896.zip |
Fix unused parameter warnings
Diffstat (limited to 'zix/common.h')
-rw-r--r-- | zix/common.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/zix/common.h b/zix/common.h index a59c033..f0737eb 100644 --- a/zix/common.h +++ b/zix/common.h @@ -52,10 +52,13 @@ extern "C" { # include <stdbool.h> #endif -#ifdef __GNUC__ -#define ZIX_UNUSED __attribute__((__unused__)) +// Unused parameter macro to suppresses warnings and make it impossible to use +#if defined(__cplusplus) +# define ZIX_UNUSED(name) +#elif defined(__GNUC__) +# define ZIX_UNUSED(name) name##_unused __attribute__((__unused__)) #else -#define ZIX_UNUSED +# define ZIX_UNUSED(name) name #endif typedef enum { |