1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fixed 'maybe_unused' attribute

```
../../../src/ext/bigdecimal/bigdecimal.c:303:5: error: 'maybe_unused' attribute cannot be applied to types
    ENTER(1);
    ^
```
This commit is contained in:
Nobuyoshi Nakada 2021-07-06 00:14:58 +09:00
parent 3db7f6353f
commit 1dfe75b0be
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -62,7 +62,11 @@ static ID id_eq;
static ID id_half;
/* MACRO's to guard objects from GC by keeping them in stack */
#ifdef RBIMPL_ATTR_MAYBE_UNUSED
#define ENTER(n) RBIMPL_ATTR_MAYBE_UNUSED() volatile VALUE vStack[n];int iStack=0
#else
#define ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0
#endif
#define PUSH(x) (vStack[iStack++] = (VALUE)(x))
#define SAVE(p) PUSH((p)->obj)
#define GUARD_OBJ(p,y) ((p)=(y), SAVE(p))