Skip to content

Commit 1dfe75b

Browse files
committed
Fixed 'maybe_unused' attribute
``` ../../../src/ext/bigdecimal/bigdecimal.c:303:5: error: 'maybe_unused' attribute cannot be applied to types ENTER(1); ^ ```
1 parent 3db7f63 commit 1dfe75b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/bigdecimal/bigdecimal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ static ID id_eq;
6262
static ID id_half;
6363

6464
/* MACRO's to guard objects from GC by keeping them in stack */
65+
#ifdef RBIMPL_ATTR_MAYBE_UNUSED
66+
#define ENTER(n) RBIMPL_ATTR_MAYBE_UNUSED() volatile VALUE vStack[n];int iStack=0
67+
#else
6568
#define ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0
69+
#endif
6670
#define PUSH(x) (vStack[iStack++] = (VALUE)(x))
6771
#define SAVE(p) PUSH((p)->obj)
6872
#define GUARD_OBJ(p,y) ((p)=(y), SAVE(p))

0 commit comments

Comments
 (0)