aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-16 12:29:42 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-16 12:29:42 +0000
commitea571c0b09bd4c0eec079c7df7b0e9669733562b (patch)
tree0c99141c5ab1567bf0865040e7193631493c7502 /internal.h
parent0b826a5197f86a42b6a35dc2c35b4356435e89fd (diff)
downloadruby-ea571c0b09bd4c0eec079c7df7b0e9669733562b.tar.gz
* internal.h (MAYBE_UNUSED): The fallback definition is needed.
Fix compile error with some non-GCC compilers such as Oracle Solaris Studio 12.3 on Solaris 10. [Bug #12767] [ruby-dev:49807] * internal.h (WARN_UNUSED_RESULT): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index 57d023600a..54e5d3bc78 100644
--- a/internal.h
+++ b/internal.h
@@ -26,6 +26,14 @@ extern "C" {
#define LIKELY(x) RB_LIKELY(x)
#define UNLIKELY(x) RB_UNLIKELY(x)
+#ifndef MAYBE_UNUSED
+# define MAYBE_UNUSED(x) x
+#endif
+
+#ifndef WARN_UNUSED_RESULT
+# define WARN_UNUSED_RESULT(x) x
+#endif
+
#ifdef HAVE_VALGRIND_MEMCHECK_H
# include <valgrind/memcheck.h>
# ifndef VALGRIND_MAKE_MEM_DEFINED