mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
cb2cfdd937
commit
0a89315b83
2 changed files with 6 additions and 3 deletions
|
@ -1,4 +1,7 @@
|
|||
Tue Jun 25 11:39:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Tue Jun 25 11:40:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* bignum.c (big2ulong): suppress shorten-64-to-32 warning. BDIGIT can
|
||||
be bigger than long now.
|
||||
|
||||
* bignum.c (LSHIFTX): remove redundant never-true expression.
|
||||
|
||||
|
|
4
bignum.c
4
bignum.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue