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

ruby-changes:52503

From: k0kubun <ko1@a...>
Date: Thu, 13 Sep 2018 15:49:54 +0900 (JST)
Subject: [ruby-changes:52503] k0kubun:r64712 (trunk): thread.c: fix -Wformat warning

k0kubun	2018-09-13 15:49:49 +0900 (Thu, 13 Sep 2018)

  New Revision: 64712

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64712

  Log:
    thread.c: fix -Wformat warning
    
    ../thread.c:1219:18: warning: format specifies type 'unsigned long' but the argument has type 'rb_hrtime_t'
          (aka 'unsigned long long') [-Wformat]
                     end, now);
                     ^~~
    ../thread.c:1219:23: warning: format specifies type 'unsigned long' but the argument has type 'rb_hrtime_t'
          (aka 'unsigned long long') [-Wformat]
                     end, now);
                          ^~~

  Modified files:
    trunk/thread.c
Index: thread.c
===================================================================
--- thread.c	(revision 64711)
+++ thread.c	(revision 64712)
@@ -1215,8 +1215,8 @@ hrtime_update_expire(rb_hrtime_t *timeou https://github.com/ruby/ruby/blob/trunk/thread.c#L1215
 
     if (now > end) return 1;
     thread_debug("hrtime_update_expire: "
-		 "%"PRI_64_PREFIX"u > %"PRI_64_PREFIX"u\n",
-                 end, now);
+                 "%"PRI_64_PREFIX"u > %"PRI_64_PREFIX"u\n",
+                 (unsigned long)end, (unsigned long)now);
     *timeout = end - now;
     return 0;
 }

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

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