Disable MUPARSER_ATTR_WARN_UNUSED_RESULT on gcc

Fixes a warning when building with gcc.
This commit is contained in:
ridiculousfish 2017-12-22 13:45:00 -08:00
parent d17b298a48
commit eeff32cde7

View file

@ -282,8 +282,8 @@ string_type parser_error_for_code(EErrorCodes code);
#endif #endif
// Define a type-level attribute declaring that this type, when used as the return value // Define a type-level attribute declaring that this type, when used as the return value
// of a function, should produce warnings. // of a function, should produce warnings. Only clang supports this on types.
#if __has_attribute(warn_unused_result) #if __clang__ && __has_attribute(warn_unused_result)
#define MUPARSER_ATTR_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #define MUPARSER_ATTR_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else #else
#define MUPARSER_ATTR_WARN_UNUSED_RESULT #define MUPARSER_ATTR_WARN_UNUSED_RESULT