From 16391af2e2f58047a6b47336e0b8970bbdaddb34 Mon Sep 17 00:00:00 2001 From: ngoto Date: Fri, 16 Sep 2016 12:29:42 +0000 Subject: [PATCH] * 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 --- ChangeLog | 9 +++++++++ internal.h | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5674772bee..ed404cddde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Fri Sep 16 21:28:25 2016 Naohisa Goto + + * 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 * 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 # ifndef VALGRIND_MAKE_MEM_DEFINED