From ca0a42a95fc75f3677be4bda9be1a8b633f03f22 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 14 Apr 2018 22:40:20 +0200 Subject: [PATCH] possibly fixed windows compilation KKona --- src/const.hpp | 4 ++-- src/precompiled_header.hpp | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/const.hpp b/src/const.hpp index 1db5a9370..3fa6ad501 100644 --- a/src/const.hpp +++ b/src/const.hpp @@ -4,12 +4,12 @@ namespace chatterino { -static const char *ANONYMOUS_USERNAME_LABEL __attribute__((unused)) = " - anonymous - "; +static const char *ANONYMOUS_USERNAME_LABEL ATTR_UNUSED = " - anonymous - "; namespace providers { namespace twitch { -static const char *ANONYMOUS_USERNAME __attribute__((unused)) = "justinfan64537"; +static const char *ANONYMOUS_USERNAME ATTR_UNUSED = "justinfan64537"; } // namespace twitch } // namespace providers diff --git a/src/precompiled_header.hpp b/src/precompiled_header.hpp index 6aa6ae57b..6eec78c8e 100644 --- a/src/precompiled_header.hpp +++ b/src/precompiled_header.hpp @@ -157,4 +157,12 @@ #define UNUSED(x) (void)(x) #endif +#ifndef ATTR_UNUSED +#ifdef Q_OS_WIN +#define ATTR_UNUSED +#else +#define ATTR_UNUSED __attribute__((unused)) +#endif +#endif + #endif