summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--bignum.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c137bc431d..5307edb7c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Nov 16 10:26:41 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * bignum.c (rb_big2ull): add a cast to get rid of a VC++ warning.
+
Wed Nov 16 09:39:27 2011 NARUSE, Yui <naruse@ruby-lang.org>
* lib/minitest/unit.rb (assert_raises): experimental fix to run
diff --git a/bignum.c b/bignum.c
index 7f47cf6efb..a1c4ac78a0 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1258,7 +1258,7 @@ rb_big2ull(VALUE x)
unsigned LONG_LONG num = big2ull(x, "unsigned long long");
if (!RBIGNUM_SIGN(x)) {
- LONG_LONG v = -num;
+ LONG_LONG v = -(LONG_LONG)num;
/* FIXNUM_MIN-1 .. LLONG_MIN mapped into 0xbfffffffffffffff .. LONG_MAX+1 */
if ((unsigned LONG_LONG)v <= LLONG_MAX)