summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--random.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 66bdc84bd3..27d90fbce6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jun 18 20:26:23 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * random.c (rb_random_int32): get rid of "warning: constant 0x100000000
+ is so big it is long" warning.
+
Mon Jun 18 20:07:23 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* dir.c (dir_initialize): get rid of "unused return: argc = rb_scan_args()"
diff --git a/random.c b/random.c
index d05fe6d9c6..7244a00538 100644
--- a/random.c
+++ b/random.c
@@ -911,7 +911,7 @@ rb_random_int32(VALUE obj)
rb_random_t *rnd = try_get_rnd(obj);
if (!rnd) {
#if SIZEOF_LONG * CHAR_BIT > 32
- VALUE lim = ULONG2NUM(0x100000000);
+ VALUE lim = ULONG2NUM(0x100000000UL);
#elif defined HAVE_LONG_LONG
VALUE lim = ULL2NUM((LONG_LONG)0xffffffff+1);
#else