From fb8b2689dbfaab178d74a89928081df336868afe Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 23 Aug 2013 02:17:25 +0000 Subject: process.c: suppress warnings * process.c (rb_clock_gettime): cast for tv_nsec explicitly to suppress warnings by VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'process.c') diff --git a/process.c b/process.c index 8bf0313e75..58d6a07bbf 100644 --- a/process.c +++ b/process.c @@ -6886,7 +6886,7 @@ rb_clock_gettime(int argc, VALUE *argv) rb_sys_fail("times"); ns = ((double)buf.tms_utime + buf.tms_stime) * (1e9 / get_clk_tck()); ts.tv_sec = (time_t)(ns*1e-9); - ts.tv_nsec = ns - ts.tv_sec*1e9; + ts.tv_nsec = (long)(ns - ts.tv_sec*1e9); goto success; } #endif @@ -6905,7 +6905,7 @@ rb_clock_gettime(int argc, VALUE *argv) ns = (uc*1e9) / CLOCKS_PER_SEC; /* uc*1e9 doesn't lose data if clock_t is 32bit. */ s = floor(ns*1e-9); ts.tv_sec = (time_t)s; - ts.tv_nsec = ns - s*1e9; + ts.tv_nsec = (long)(ns - s*1e9); goto success; } -- cgit v1.2.3