diff options
author | Brad King <brad.king@kitware.com> | 2009-09-11 08:18:15 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-09-11 08:18:15 -0400 |
commit | b41a548d86f8989e790f0150abd3eb337e8c03d0 (patch) | |
tree | e22e5e910e1b5769e8bcec6fa20ac703df013e55 /Source/CTest/cmCTestBuildHandler.cxx | |
parent | e0df0495e5b313e1f017ebb938c4522db6d5b89c (diff) | |
download | cmake-b41a548d86f8989e790f0150abd3eb337e8c03d0.tar.gz |
Add parentheses around '&&' between '||' for gcc
The GNU compiler warns about possible operator precedence mistakes and
asks for explicit parentheses (-Wparentheses). We add the parentheses
to silence the warning. This also fixes one real logic error in the
find_package() implementation by correcting expression evaluation order.
Diffstat (limited to 'Source/CTest/cmCTestBuildHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index d85df86167..f9982355ba 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -611,8 +611,8 @@ void cmCTestBuildHandler::GenerateXMLLogScraped(std::ostream& os) it != ew.end() && (numErrorsAllowed || numWarningsAllowed); it++ ) { cmCTestBuildErrorWarning *cm = &(*it); - if (cm->Error && numErrorsAllowed || - !cm->Error && numWarningsAllowed) + if ((cm->Error && numErrorsAllowed) || + (!cm->Error && numWarningsAllowed)) { if (cm->Error) { @@ -681,8 +681,8 @@ void cmCTestBuildHandler::GenerateXMLLogScraped(std::ostream& os) << "</PreContext>\n" << "\t\t<PostContext>" << cmXMLSafe(cm->PostContext).Quotes(false); // is this the last warning or error, if so notify - if (cm->Error && !numErrorsAllowed || - !cm->Error && !numWarningsAllowed) + if ((cm->Error && !numErrorsAllowed) || + (!cm->Error && !numWarningsAllowed)) { os << "\nThe maximum number of reported warnings or errors has been " "reached!!!\n"; |