diff options
author | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-16 12:29:42 +0000 |
---|---|---|
committer | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-16 12:29:42 +0000 |
commit | 16391af2e2f58047a6b47336e0b8970bbdaddb34 (patch) | |
tree | 0c99141c5ab1567bf0865040e7193631493c7502 | |
parent | c1dbcf9b7e463b3edbebfec5ab6f4ab4681bb6b7 (diff) |
* 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
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | internal.h | 8 |
2 files changed, 17 insertions, 0 deletions
@@ -1,3 +1,12 @@ +Fri Sep 16 21:28:25 2016 Naohisa Goto <[email protected]> + + * 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. + Fri Sep 16 21:19:51 2016 Naohisa Goto <[email protected]> * hash.c (each_pair_i_fast): Fix compile error with old version of 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 |