ruby-changes:39635
From: nobu <ko1@a...>
Date: Fri, 28 Aug 2015 20:35:13 +0900 (JST)
Subject: [ruby-changes:39635] nobu:r51716 (trunk): win32.c: suppress warnings
nobu 2015-08-28 20:34:53 +0900 (Fri, 28 Aug 2015) New Revision: 51716 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51716 Log: win32.c: suppress warnings * win32/win32.c (wrename): fix type of attributes to suppress warnings. Modified files: trunk/win32/win32.c Index: win32/win32.c =================================================================== --- win32/win32.c (revision 51715) +++ win32/win32.c (revision 51716) @@ -5002,7 +5002,7 @@ static int https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L5002 wrename(const WCHAR *oldpath, const WCHAR *newpath) { int res = 0; - int oldatts = -1, newatts = -1; + DWORD oldatts, newatts = (DWORD)-1; DWORD oldvsn = 0, newvsn = 0, e; e = get_attr_vsn(oldpath, &oldatts, &oldvsn); @@ -5024,7 +5024,7 @@ wrename(const WCHAR *oldpath, const WCHA https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L5024 get_attr_vsn(newpath, &newatts, &newvsn); RUBY_CRITICAL({ - if (newatts != -1 && newatts & FILE_ATTRIBUTE_READONLY) + if (newatts != (DWORD)-1 && newatts & FILE_ATTRIBUTE_READONLY) SetFileAttributesW(newpath, newatts & ~ FILE_ATTRIBUTE_READONLY); if (!MoveFileExW(oldpath, newpath, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED)) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/