diff options
author | Naohisa Goto <[email protected]> | 2024-12-18 23:37:22 +0900 |
---|---|---|
committer | Naohisa Goto <[email protected]> | 2024-12-18 23:37:22 +0900 |
commit | 528ec7060464d30359e593055df6b53362cd1060 (patch) | |
tree | dc3f34cc98f8058c69c0ce05f48ec7c0d2f6e243 /include/ruby/internal/static_assert.h | |
parent | d07aa670b4e38c1e7bb17c42ebf86a8012b0f987 (diff) |
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]
Diffstat (limited to 'include/ruby/internal/static_assert.h')
-rw-r--r-- | include/ruby/internal/static_assert.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ruby/internal/static_assert.h b/include/ruby/internal/static_assert.h index b9ff6646e7..7f00bc21eb 100644 --- a/include/ruby/internal/static_assert.h +++ b/include/ruby/internal/static_assert.h @@ -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 */ |