aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-28 11:34:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-28 11:34:53 +0000
commitb07290078006f5a2a828b144c1d35fbe04162e32 (patch)
tree711fc54a4326e9c4e583defcbabf6b0d8197887d /win32/win32.c
parent94c5f5a77ca629f8288230972eee6257c9626ce5 (diff)
downloadruby-b07290078006f5a2a828b144c1d35fbe04162e32.tar.gz
win32.c: suppress warnings
* win32/win32.c (wrename): fix type of attributes to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 70e95d1414..b10eebf885 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -5002,7 +5002,7 @@ static int
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 WCHAR *newpath)
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))