From aa1141e16721e09d2ec468bcab0e545af52fbb4c Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 2 Aug 2010 22:34:44 +0000 Subject: * ext/bigdecimal/bigdecimal.c (BigDecimal_hash): fix type warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/bigdecimal/bigdecimal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/bigdecimal') diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 239fe05a76..2afe3f796d 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -223,12 +223,12 @@ BigDecimal_hash(VALUE self) { ENTER(1); Real *p; - U_LONG hash,i; + st_index_t hash; GUARD_OBJ(p,GetVpValue(self,1)); hash = (U_LONG)p->sign; /* hash!=2: the case for 0(1),NaN(0) or +-Infinity(3) is sign itself */ - if(hash == 2 || hash == -2) { + if(hash == 2 || hash == (st_index_t)-2) { hash ^= rb_memhash(p->frac, sizeof(U_LONG)*p->Prec); hash += p->exponent; } -- cgit v1.2.3