diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | random.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -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()" @@ -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 |