diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 03:46:52 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 03:46:52 +0000 |
commit | 8dcdfe36b7c3c084764604f14b67b04fb3f4be01 (patch) | |
tree | 815b725bb149b308eda39e8939c14937ad2ce671 /bignum.c | |
parent | 26dd237449561f92920e4b9af1b4868f401e4e71 (diff) | |
download | ruby-8dcdfe36b7c3c084764604f14b67b04fb3f4be01.tar.gz |
* bignum.c (integer_unpack_single_bdigit): Use "1 + ~u" instead of
"-u" to suppress warning (C4146) by Visual Studio.
Reported by ko1 via IRC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1351,7 +1351,7 @@ integer_unpack_single_bdigit(BDIGIT u, size_t size, int flags, BDIGIT *dp) ((u >> (size * CHAR_BIT - 1)) ? -1 : 1); if (sign < 0) { u |= LSHIFTX(BDIGMAX, size * CHAR_BIT); - u = BIGLO(-u); + u = BIGLO(1 + ~u); } } else |