From 331269819ac4f83bc263a7cd125a780d3bdafa70 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 5 Sep 2015 23:14:25 +0000 Subject: 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 --- win32/win32.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'win32') diff --git a/win32/win32.c b/win32/win32.c index dfdd1e1c32..2a58876c4d 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -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; -- cgit v1.2.3