From eeff32cde7171f083f44cd9cbf933917dc827c60 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 22 Dec 2017 13:45:00 -0800 Subject: [PATCH] Disable MUPARSER_ATTR_WARN_UNUSED_RESULT on gcc Fixes a warning when building with gcc. --- muparser-2.2.5/include/muParserDef.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/muparser-2.2.5/include/muParserDef.h b/muparser-2.2.5/include/muParserDef.h index 750c519b1..f96e6e207 100644 --- a/muparser-2.2.5/include/muParserDef.h +++ b/muparser-2.2.5/include/muParserDef.h @@ -282,8 +282,8 @@ string_type parser_error_for_code(EErrorCodes code); #endif // Define a type-level attribute declaring that this type, when used as the return value -// of a function, should produce warnings. -#if __has_attribute(warn_unused_result) +// of a function, should produce warnings. Only clang supports this on types. +#if __clang__ && __has_attribute(warn_unused_result) #define MUPARSER_ATTR_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else #define MUPARSER_ATTR_WARN_UNUSED_RESULT