diff options
author | Brad King <brad.king@kitware.com> | 2009-09-11 12:18:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-09-11 12:18:15 (GMT) |
commit | b41a548d86f8989e790f0150abd3eb337e8c03d0 (patch) | |
tree | e22e5e910e1b5769e8bcec6fa20ac703df013e55 /Source/cmFileCommand.cxx | |
parent | e0df0495e5b313e1f017ebb938c4522db6d5b89c (diff) | |
download | CMake-b41a548d86f8989e790f0150abd3eb337e8c03d0.zip CMake-b41a548d86f8989e790f0150abd3eb337e8c03d0.tar.gz CMake-b41a548d86f8989e790f0150abd3eb337e8c03d0.tar.bz2 |
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/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index f9a7dfc..47e098f 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -590,7 +590,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args) { // Ignore CR character to make output always have UNIX newlines. } - else if(c >= 0x20 && c < 0x7F || c == '\t' || c == '\f' || + else if((c >= 0x20 && c < 0x7F) || c == '\t' || c == '\f' || (c == '\n' && newline_consume)) { // This is an ASCII character that may be part of a string. @@ -1973,7 +1973,7 @@ bool cmFileInstaller::HandleInstallDestination() if ( ch1 != '/' ) { int relative = 0; - if ( ( ch1 >= 'a' && ch1 <= 'z' || ch1 >= 'A' && ch1 <= 'Z' ) && + if (((ch1 >= 'a' && ch1 <= 'z') || (ch1 >= 'A' && ch1 <= 'Z')) && ch2 == ':' ) { // Assume windows |