https://github.com/python/cpython/commit/7cbcb6efd9e3b2727bc31748bced511def3727c2 commit: 7cbcb6efd9e3b2727bc31748bced511def3727c2 branch: main author: Chris Eibl <138194463+chris-e...@users.noreply.github.com> committer: zooba <steve.do...@microsoft.com> date: 2025-03-31T15:54:30+01:00 summary:
GH-131296: Fix parenthesis warnings on Windows-specific code (GH-131905) files: M Modules/_ssl.c M Modules/posixmodule.c M PC/launcher2.c diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 6615d6d0b99802..e6bfbe46add9e9 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -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) { diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index f3ce1fb632226e..b7300def8dc75f 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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; } diff --git a/PC/launcher2.c b/PC/launcher2.c index 72121724726ccb..02ab417bb27ece 100644 --- a/PC/launcher2.c +++ b/PC/launcher2.c @@ -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) { _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com