Skip to content

Commit 7cbcb6e

Browse files
authored
GH-131296: Fix parenthesis warnings on Windows-specific code (GH-131905)
1 parent cf839c3 commit 7cbcb6e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Modules/_ssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6111,7 +6111,7 @@ _ssl_enum_certificates_impl(PyObject *module, const char *store_name)
61116111
return PyErr_SetFromWindowsErr(GetLastError());
61126112
}
61136113

6114-
while (pCertCtx = CertEnumCertificatesInStore(hCollectionStore, pCertCtx)) {
6114+
while ((pCertCtx = CertEnumCertificatesInStore(hCollectionStore, pCertCtx))) {
61156115
cert = PyBytes_FromStringAndSize((const char*)pCertCtx->pbCertEncoded,
61166116
pCertCtx->cbCertEncoded);
61176117
if (!cert) {
@@ -6210,7 +6210,7 @@ _ssl_enum_crls_impl(PyObject *module, const char *store_name)
62106210
return PyErr_SetFromWindowsErr(GetLastError());
62116211
}
62126212

6213-
while (pCrlCtx = CertEnumCRLsInStore(hCollectionStore, pCrlCtx)) {
6213+
while ((pCrlCtx = CertEnumCRLsInStore(hCollectionStore, pCrlCtx))) {
62146214
crl = PyBytes_FromStringAndSize((const char*)pCrlCtx->pbCrlEncoded,
62156215
pCrlCtx->cbCrlEncoded);
62166216
if (!crl) {

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5372,7 +5372,7 @@ _testFileExistsByName(LPCWSTR path, BOOL followLinks)
53725372
sizeof(info)))
53735373
{
53745374
if (!(info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) ||
5375-
!followLinks && IsReparseTagNameSurrogate(info.ReparseTag))
5375+
(!followLinks && IsReparseTagNameSurrogate(info.ReparseTag)))
53765376
{
53775377
return TRUE;
53785378
}

PC/launcher2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2760,7 +2760,7 @@ process(int argc, wchar_t ** argv)
27602760
// We searched earlier, so if we didn't find anything, now we react
27612761
exitCode = searchExitCode;
27622762
// If none found, and if permitted, install it
2763-
if (exitCode == RC_NO_PYTHON && isEnvVarSet(L"PYLAUNCHER_ALLOW_INSTALL") ||
2763+
if (((exitCode == RC_NO_PYTHON) && isEnvVarSet(L"PYLAUNCHER_ALLOW_INSTALL")) ||
27642764
isEnvVarSet(L"PYLAUNCHER_ALWAYS_INSTALL")) {
27652765
exitCode = installEnvironment(&search);
27662766
if (!exitCode) {

0 commit comments

Comments
 (0)