aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxtkoba <69125751+xtkoba@users.noreply.github.com>2021-05-02 15:45:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-04 08:13:37 +0900
commit0cf9197988a72f0defb670a8f03f8427d41c4bec (patch)
tree95f3867c1a4dea36ddaa6ce71b4c3bc27b1a0809
parent761383166e62f19f895f42b85b2a04638b4f4e42 (diff)
downloadruby-0cf9197988a72f0defb670a8f03f8427d41c4bec.tar.gz
Clang never evaluates expr in `__builtin_assume`
-rw-r--r--win32/win32.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 23a69fda4d..c938e197a7 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -5345,11 +5345,13 @@ get_attr_vsn(const WCHAR *path, DWORD *atts, DWORD *vsn)
HANDLE h = open_special(path, 0, FILE_FLAG_OPEN_REPARSE_POINT);
if (h == INVALID_HANDLE_VALUE) {
- ASSUME(e = GetLastError());
+ e = GetLastError();
+ ASSUME(e);
return e;
}
if (!GetFileInformationByHandle(h, &st)) {
- ASSUME(e = GetLastError());
+ e = GetLastError();
+ ASSUME(e);
}
else {
*atts = st.dwFileAttributes;