* win32/win32.c (get_attr_vsn): assume GetLastError() never return
  0, to suppress a maybe-uninitialized warning in wrename().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-09-05 23:14:25 +00:00
Родитель 5e57dc0fae
Коммит 649016bdb1
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -4981,9 +4981,12 @@ get_attr_vsn(const WCHAR *path, DWORD *atts, DWORD *vsn)
DWORD e = 0;
HANDLE h = open_special(path, 0, FILE_FLAG_OPEN_REPARSE_POINT);
if (h == INVALID_HANDLE_VALUE) return GetLastError();
if (h == INVALID_HANDLE_VALUE) {
ASSUME(e = GetLastError());
return e;
}
if (!GetFileInformationByHandle(h, &st)) {
e = GetLastError();
ASSUME(e = GetLastError());
}
else {
*atts = st.dwFileAttributes;