mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
use RBIMPL_ATTR_MAYBE_UNUSED
The macro MAYBE_UNUSED, prepared by ./configure, may not be defined in some environments such as Oracle Developer Studio 12.5 on Solaris 10. This fixes [Bug #20963]
This commit is contained in:
parent
d07aa670b4
commit
528ec70604
1 changed files with 2 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
|||
#include <assert.h>
|
||||
#include "ruby/internal/has/extension.h"
|
||||
#include "ruby/internal/compiler_since.h"
|
||||
#include "ruby/internal/attr/maybe_unused.h"
|
||||
|
||||
/** @cond INTERNAL_MACRO */
|
||||
#if defined(__cplusplus) && defined(__cpp_static_assert)
|
||||
|
@ -71,7 +72,7 @@
|
|||
|
||||
#else
|
||||
# define RBIMPL_STATIC_ASSERT(name, expr) \
|
||||
MAYBE_UNUSED(typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)])
|
||||
RBIMPL_ATTR_MAYBE_UNUSED() typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)]
|
||||
#endif
|
||||
|
||||
#endif /* RBIMPL_STATIC_ASSERT_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue