From fc35affa3b72b2a01b6a69f45253bea62f79a9e9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 15 May 2016 12:57:49 +0200 Subject: api/shortcuts: appease "attribute unused but used" warning --- opentrack/shortcuts.cpp | 2 +- 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; -- cgit v1.2.3