diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-13 03:09:22 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-13 03:09:22 +0000 |
commit | 3a6dec0c5daf568f4846f10fed9c115bc164871b (patch) | |
tree | e746644d3302cde5d97e671a3c5987ba65b3a751 /ext | |
parent | 14d72e66858fac7297e193d116ae7363b222b398 (diff) | |
download | ruby-3a6dec0c5daf568f4846f10fed9c115bc164871b.tar.gz |
* include/ruby/ruby.h (RB_UNUSED_VAR): new macro to suppress
warnings for unused variables.
* ext/bigdecimal/bigdecimal.c (ENTER): use RB_UNUSED_VAR() to
suppress annoying warnings by -Wunused-but-set-variable in gcc 4.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 1435c03eb0..b161bc95ca 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -60,7 +60,7 @@ static ID id_to_r; static ID id_eq; /* MACRO's to guard objects from GC by keeping them in stack */ -#define ENTER(n) volatile VALUE vStack[n];int iStack=0 +#define ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0 #define PUSH(x) vStack[iStack++] = (VALUE)(x); #define SAVE(p) PUSH(p->obj); #define GUARD_OBJ(p,y) {p=y;SAVE(p);} |