]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-131296: Fix parenthesis warnings on Windows-specific code (GH-131905)
authorChris Eibl <138194463+chris-eibl@users.noreply.github.com>
Mon, 31 Mar 2025 14:54:30 +0000 (16:54 +0200)
committerGitHub <noreply@github.com>
Mon, 31 Mar 2025 14:54:30 +0000 (15:54 +0100)
Modules/_ssl.c
Modules/posixmodule.c
PC/launcher2.c

index 6615d6d0b998025b1baac9d7fbaf9f5824568ac2..e6bfbe46add9e97ff7ed530ae56cbd1eb66e5b38 100644 (file)
@@ -6111,7 +6111,7 @@ _ssl_enum_certificates_impl(PyObject *module, const char *store_name)
         return PyErr_SetFromWindowsErr(GetLastError());
     }
 
-    while (pCertCtx = CertEnumCertificatesInStore(hCollectionStore, pCertCtx)) {
+    while ((pCertCtx = CertEnumCertificatesInStore(hCollectionStore, pCertCtx))) {
         cert = PyBytes_FromStringAndSize((const char*)pCertCtx->pbCertEncoded,
                                             pCertCtx->cbCertEncoded);
         if (!cert) {
@@ -6210,7 +6210,7 @@ _ssl_enum_crls_impl(PyObject *module, const char *store_name)
         return PyErr_SetFromWindowsErr(GetLastError());
     }
 
-    while (pCrlCtx = CertEnumCRLsInStore(hCollectionStore, pCrlCtx)) {
+    while ((pCrlCtx = CertEnumCRLsInStore(hCollectionStore, pCrlCtx))) {
         crl = PyBytes_FromStringAndSize((const char*)pCrlCtx->pbCrlEncoded,
                                             pCrlCtx->cbCrlEncoded);
         if (!crl) {
index f3ce1fb632226ec9b43483f89737f502761b270c..b7300def8dc75ff47bf002b15fb3ae08f03ae8b2 100644 (file)
@@ -5372,7 +5372,7 @@ _testFileExistsByName(LPCWSTR path, BOOL followLinks)
                                      sizeof(info)))
     {
         if (!(info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) ||
-            !followLinks && IsReparseTagNameSurrogate(info.ReparseTag))
+            (!followLinks && IsReparseTagNameSurrogate(info.ReparseTag)))
         {
             return TRUE;
         }
index 72121724726ccb9f0a019d5114393e284768afee..02ab417bb27ece0cf1a937841600c64d89122353 100644 (file)
@@ -2760,7 +2760,7 @@ process(int argc, wchar_t ** argv)
     // We searched earlier, so if we didn't find anything, now we react
     exitCode = searchExitCode;
     // If none found, and if permitted, install it
-    if (exitCode == RC_NO_PYTHON && isEnvVarSet(L"PYLAUNCHER_ALLOW_INSTALL") ||
+    if (((exitCode == RC_NO_PYTHON) && isEnvVarSet(L"PYLAUNCHER_ALLOW_INSTALL")) ||
         isEnvVarSet(L"PYLAUNCHER_ALWAYS_INSTALL")) {
         exitCode = installEnvironment(&search);
         if (!exitCode) {