mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* random.c (rb_random_int32): get rid of "warning: constant 0x100000000
is so big it is long" warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9021777282
commit
a57cbd7b27
2 changed files with 6 additions and 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()"
|
||||
|
|
2
random.c
2
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
|
||||
|
|
Loading…
Reference in a new issue