Skip to content

Commit 528ec70

Browse files
committed
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]
1 parent d07aa67 commit 528ec70

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/ruby/internal/static_assert.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <assert.h>
2424
#include "ruby/internal/has/extension.h"
2525
#include "ruby/internal/compiler_since.h"
26+
#include "ruby/internal/attr/maybe_unused.h"
2627

2728
/** @cond INTERNAL_MACRO */
2829
#if defined(__cplusplus) && defined(__cpp_static_assert)
@@ -71,7 +72,7 @@
7172

7273
#else
7374
# define RBIMPL_STATIC_ASSERT(name, expr) \
74-
MAYBE_UNUSED(typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)])
75+
RBIMPL_ATTR_MAYBE_UNUSED() typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)]
7576
#endif
7677

7778
#endif /* RBIMPL_STATIC_ASSERT_H */

0 commit comments

Comments
 (0)