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

ruby-changes:30593

From: akr <ko1@a...>
Date: Fri, 23 Aug 2013 22:25:19 +0900 (JST)
Subject: [ruby-changes:30593] akr:r42672 (trunk): * process.c (rb_clock_gettime): Add a cast to fix compile error by

akr	2013-08-23 22:25:12 +0900 (Fri, 23 Aug 2013)

  New Revision: 42672

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

  Log:
    * process.c (rb_clock_gettime): Add a cast to fix compile error by
      -Werror,-Wshorten-64-to-32.

  Modified files:
    trunk/ChangeLog
    trunk/process.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42671)
+++ ChangeLog	(revision 42672)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Aug 23 22:22:07 2013  Tanaka Akira  <akr@f...>
+
+	* process.c (rb_clock_gettime): Add a cast to fix compile error by
+	  -Werror,-Wshorten-64-to-32.
+
 Fri Aug 23 22:12:13 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* process.c (rb_intern): no symbol cache while initialization.
Index: process.c
===================================================================
--- process.c	(revision 42671)
+++ process.c	(revision 42672)
@@ -6989,7 +6989,7 @@ rb_clock_gettime(int argc, VALUE *argv) https://github.com/ruby/ruby/blob/trunk/process.c#L6989
             if (ret != 0)
                 rb_sys_fail("getrusage");
             tt.giga_count = usage.ru_utime.tv_sec + usage.ru_stime.tv_sec;
-            usec = usage.ru_utime.tv_usec + usage.ru_stime.tv_usec;
+            usec = (int32_t)(usage.ru_utime.tv_usec + usage.ru_stime.tv_usec);
             if (1000000 <= usec) {
                 tt.giga_count++;
                 usec -= 1000000;

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

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