diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-05-15 12:57:49 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-05-15 12:57:59 +0200 |
commit | fc35affa3b72b2a01b6a69f45253bea62f79a9e9 (patch) | |
tree | cffa8d3d01cf29512bde397e2d490edf05bd1673 | |
parent | e55842f6aed77738d34134c38ec571c397ea04f9 (diff) |
api/shortcuts: appease "attribute unused but used" warning
-rw-r--r-- | opentrack/shortcuts.cpp | 2 | ||||
-rw-r--r-- | opentrack/shortcuts.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp index 4488065f..2616bab3 100644 --- a/opentrack/shortcuts.cpp +++ b/opentrack/shortcuts.cpp @@ -25,7 +25,7 @@ void Shortcuts::free_binding(K& key) #endif } -void Shortcuts::bind_keyboard_shortcut(K &key, const key_opts& k, unused(bool, held)) +void Shortcuts::bind_keyboard_shortcut(K &key, const key_opts& k, unused_on_unix(bool, held)) { #if !defined(_WIN32) using sh = QxtGlobalShortcut; diff --git a/opentrack/shortcuts.h b/opentrack/shortcuts.h index e9935b01..2362c88b 100644 --- a/opentrack/shortcuts.h +++ b/opentrack/shortcuts.h @@ -26,10 +26,10 @@ # include "keybinding-worker.hpp" #endif -#ifdef __GNUC__ -# define unused(t, i) t __attribute__((unused)) i +#if defined(__GNUC__) && !defined(_WIN32) +# define unused_on_unix(t, i) t __attribute__((unused)) i #else -# define unused(t, i) t i +# define unused_on_unix(t, i) t i #endif using namespace options; |