* 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
This commit is contained in:
ngoto 2016-09-16 12:29:42 +00:00
Родитель c1dbcf9b7e
Коммит 16391af2e2
2 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,12 @@
Fri Sep 16 21:28:25 2016 Naohisa Goto <ngotogenome@gmail.com>
* 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 <ngotogenome@gmail.com>
* hash.c (each_pair_i_fast): Fix compile error with old version of

Просмотреть файл

@ -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