diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 02:40:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 02:40:11 +0000 |
commit | 0a89315b83671e833b306bd047460dc8194037ae (patch) | |
tree | b78ee60e49db6d9103b3f25202c9b183ac5065cb /bignum.c | |
parent | cb2cfdd937c07f9c521a5ea58ed339ff674c22f4 (diff) | |
download | ruby-0a89315b83671e833b306bd047460dc8194037ae.tar.gz |
bignum.c: suppress warning
* bignum.c (big2ulong): suppress shorten-64-to-32 warning. BDIGIT can
be bigger than long now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2422,8 +2422,8 @@ big2ulong(VALUE x, const char *type, int check) ds = BDIGITS(x); num = 0; while (len--) { - num = BIGUP(num); - num += ds[len]; + num <<= BITSPERDIG; + num += (unsigned long)ds[len]; /* overflow is already checked */ } return num; } |