From 31d91659998a2f34395ab44c89940262e71dca22 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 15 Aug 2024 00:47:57 +0200 Subject: [PATCH] win: remove deprecated GetVersionExW call (#4486) --- src/win/util.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/win/util.c b/src/win/util.c index 628136c4..deed2e35 100644 --- a/src/win/util.c +++ b/src/win/util.c @@ -1535,20 +1535,7 @@ int uv_os_uname(uv_utsname_t* buffer) { os_info.dwOSVersionInfoSize = sizeof(os_info); os_info.szCSDVersion[0] = L'\0'; - /* Try calling RtlGetVersion(), and fall back to the deprecated GetVersionEx() - if RtlGetVersion() is not available. */ - if (pRtlGetVersion) { - pRtlGetVersion(&os_info); - } else { - /* Silence GetVersionEx() deprecation warning. */ - #ifdef _MSC_VER - #pragma warning(suppress : 4996) - #endif - if (GetVersionExW(&os_info) == 0) { - r = uv_translate_sys_error(GetLastError()); - goto error; - } - } + pRtlGetVersion(&os_info); /* Populate the version field. */ version_size = 0;