зеркало из https://github.com/github/ruby.git
win32.c: suppress a warning
* 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:
Родитель
5e57dc0fae
Коммит
649016bdb1
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче