[前][次][番号順一覧][スレッド一覧]

ruby-changes:24094

From: kosaki <ko1@a...>
Date: Wed, 20 Jun 2012 06:50:40 +0900 (JST)
Subject: [ruby-changes:24094] kosaki:r36144 (trunk): * random.c (rb_random_int32): get rid of "warning: constant 0x100000000

kosaki	2012-06-20 06:49:52 +0900 (Wed, 20 Jun 2012)

  New Revision: 36144

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36144

  Log:
    * random.c (rb_random_int32): get rid of "warning: constant 0x100000000
      is so big it is long" warning.

  Modified files:
    trunk/ChangeLog
    trunk/random.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36143)
+++ ChangeLog	(revision 36144)
@@ -1,3 +1,8 @@
+Mon Jun 18 20:26:23 2012  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* 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@g...>
 
 	* dir.c (dir_initialize): get rid of "unused return: argc = rb_scan_args()"
Index: random.c
===================================================================
--- random.c	(revision 36143)
+++ random.c	(revision 36144)
@@ -911,7 +911,7 @@
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]