aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal.h b/internal.h
index c53b8eab95..d4565ee437 100644
--- a/internal.h
+++ b/internal.h
@@ -30,18 +30,18 @@ extern "C" {
# define __has_attribute(x) 0
#endif
-#if __has_attribute(unused)
-#define UNINITIALIZED_VAR(x) x __attribute__((unused))
+#if __has_attribute(__unused__)
+#define UNINITIALIZED_VAR(x) x __attribute__((__unused__))
#elif defined(__GNUC__) && __GNUC__ >= 3
#define UNINITIALIZED_VAR(x) x = x
#else
#define UNINITIALIZED_VAR(x) x
#endif
-#if __has_attribute(warn_unused_result)
-#define WARN_UNUSED_RESULT(x) x __attribute__((warn_unused_result))
+#if __has_attribute(__warn_unused_result__)
+#define WARN_UNUSED_RESULT(x) x __attribute__((__warn_unused_result__))
#elif defined(__GNUC__) && (__GNUC__ * 1000 + __GNUC_MINOR__) >= 3004
-#define WARN_UNUSED_RESULT(x) x __attribute__((warn_unused_result))
+#define WARN_UNUSED_RESULT(x) x __attribute__((__warn_unused_result__))
#else
#define WARN_UNUSED_RESULT(x) x
#endif