mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Disable MUPARSER_ATTR_WARN_UNUSED_RESULT on gcc
Fixes a warning when building with gcc.
This commit is contained in:
parent
d17b298a48
commit
eeff32cde7
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue