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

ruby-changes:28756

From: akr <ko1@a...>
Date: Sat, 18 May 2013 16:58:48 +0900 (JST)
Subject: [ruby-changes:28756] akr:r40808 (trunk): * ext/socket/mkconstants.rb (INTEGER2VALUE): Suppress a warning:

akr	2013-05-18 16:58:36 +0900 (Sat, 18 May 2013)

  New Revision: 40808

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

  Log:
    * ext/socket/mkconstants.rb (INTEGER2VALUE): Suppress a warning:
      comparison between signed and unsigned integer expressions

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/mkconstants.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40807)
+++ ChangeLog	(revision 40808)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat May 18 16:57:58 2013  Tanaka Akira  <akr@f...>
+
+	* ext/socket/mkconstants.rb (INTEGER2VALUE): Suppress a warning:
+	  comparison between signed and unsigned integer expressions
+
 Sat May 18 16:38:39 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* compile.c (iseq_compile_each): forward anonymous and first keyword
Index: ext/socket/mkconstants.rb
===================================================================
--- ext/socket/mkconstants.rb	(revision 40807)
+++ ext/socket/mkconstants.rb	(revision 40808)
@@ -282,11 +282,11 @@ result = ERB.new(<<'EOS', nil, '%').resu https://github.com/ruby/ruby/blob/trunk/ext/socket/mkconstants.rb#L282
 #ifdef HAVE_LONG_LONG
 #define INTEGER2VALUE(n) (0 < (n) ? \
     ((n) <= FIXNUM_MAX ? LONG2FIX(n) : ULL2NUM(n)) : \
-    (FIXNUM_MIN <= (n) ? LONG2FIX(n) : LL2NUM(n)))
+    (FIXNUM_MIN <= (LONG_LONG)(n) ? LONG2FIX(n) : LL2NUM(n)))
 #else
 #define INTEGER2VALUE(n) (0 < (n) ? \
     ((n) <= FIXNUM_MAX ? LONG2FIX(n) : ULONG2NUM(n)) : \
-    (FIXNUM_MIN <= (n) ? LONG2FIX(n) : LONG2NUM(n)))
+    (FIXNUM_MIN <= (long)(n) ? LONG2FIX(n) : LONG2NUM(n)))
 #endif
 
 static void

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

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