From 6c8b9020a8b4b2b0b4e7643b4c7c7fbd6f6f49a4 Mon Sep 17 00:00:00 2001 From: Dmitriy Anisimkov Date: Mon, 25 May 2020 00:57:12 +0600 Subject: [PATCH] [Ada] Fix C miss parentheses warning on Windows gcc/ada/ * socket.c [_WIN32] (__gnat_minus_500ms): Parentheses around && operations. Remove notes about TN in comment. --- gcc/ada/socket.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index 96baebfc25a..8333b6b57eb 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -808,14 +808,12 @@ int __gnat_minus_500ms() { ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); // Documentation proposes to use IsWindowsVersionOrGreater(10, 0, 17763) - // but it does not compare by the build number (last parameter). See - // regression test for RC03-012 in fixedbugs, there are some code to - // investigate Windows version API behavior. + // but it does not compare by the build number (last parameter). GetVersionEx(&osvi); return osvi.dwMajorVersion < 10 - || osvi.dwMajorVersion == 10 - && osvi.dwMinorVersion == 0 - && osvi.dwBuildNumber < 17763; + || (osvi.dwMajorVersion == 10 + && osvi.dwMinorVersion == 0 + && osvi.dwBuildNumber < 17763); } else { return !IsWindows8OrGreater(); } -- 2.30.2