ruby-changes:30340
From: nobu <ko1@a...>
Date: Tue, 6 Aug 2013 14:13:05 +0900 (JST)
Subject: [ruby-changes:30340] nobu:r42394 (trunk): win32.c: supprss warning
nobu 2013-08-06 14:12:48 +0900 (Tue, 06 Aug 2013) New Revision: 42394 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42394 Log: win32.c: supprss warning * win32/win32.c (rb_w32_system_tmpdir): supprss a sign-compare warning. Modified files: trunk/win32/win32.c _______________________________________________ ruby-cvs mailing list ruby-cvs@r... http://lists.ruby-lang.org/cgi-bin/mailman/listinfo/ruby-cvs Index: win32/win32.c =================================================================== --- win32/win32.c (revision 42393) +++ win32/win32.c (revision 42394) @@ -490,9 +490,9 @@ rb_w32_system_tmpdir(WCHAR *path, UINT l https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L490 } p = translate_wchar(path, L'\\', L'/'); if (*(p - 1) != L'/') *p++ = L'/'; - if (p - path + numberof(temp) >= len) return 0; + if ((UINT)(p - path + numberof(temp)) >= len) return 0; memcpy(p, temp, sizeof(temp)); - return p - path + numberof(temp) - 1; + return (UINT)(p - path + numberof(temp) - 1); } /* License: Ruby's */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/