FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-131296: fix clang-cl parentheses warnings on Windows by chris-eibl · Pull Request #131905 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (3) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 2 additions & 2 deletions Modules/_ssl.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Fix warning : using the result of an assignment as a condition without parentheses [-Wparentheses].

cert = PyBytes_FromStringAndSize((const char*)pCertCtx->pbCertEncoded,
pCertCtx->cbCertEncoded);
if (!cert) {
Expand Down Expand Up @@ -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))) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Fix warning : using the result of an assignment as a condition without parentheses [-Wparentheses].

crl = PyBytes_FromStringAndSize((const char*)pCrlCtx->pbCrlEncoded,
pCrlCtx->cbCrlEncoded);
if (!crl) {
Expand Down
2 changes: 1 addition & 1 deletion Modules/posixmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Fix warning : '&&' within '||' [-Wlogical-op-parentheses].

{
return TRUE;
}
Expand Down
2 changes: 1 addition & 1 deletion PC/launcher2.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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")) ||

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Fix warning : '&&' within '||' [-Wlogical-op-parentheses].

isEnvVarSet(L"PYLAUNCHER_ALWAYS_INSTALL")) {
exitCode = installEnvironment(&search);
if (!exitCode) {
Expand Down

Back | FazBrowse Home | New Git URL