[Cmake-commits] [cmake-commits] king committed cmCTestBuildHandler.cxx 1.73 1.74

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Sep 11 08:18:00 EDT 2009


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv1018/Source/CTest

Modified Files:
	cmCTestBuildHandler.cxx 
Log Message:
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.


Index: cmCTestBuildHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestBuildHandler.cxx,v
retrieving revision 1.73
retrieving revision 1.74
diff -C 2 -d -r1.73 -r1.74
*** cmCTestBuildHandler.cxx	12 Feb 2009 18:00:22 -0000	1.73
--- cmCTestBuildHandler.cxx	11 Sep 2009 12:17:56 -0000	1.74
***************
*** 612,617 ****
      {
      cmCTestBuildErrorWarning *cm = &(*it);
!     if (cm->Error && numErrorsAllowed ||
!         !cm->Error && numWarningsAllowed)
        {
        if (cm->Error)
--- 612,617 ----
      {
      cmCTestBuildErrorWarning *cm = &(*it);
!     if ((cm->Error && numErrorsAllowed) ||
!         (!cm->Error && numWarningsAllowed))
        {
        if (cm->Error)
***************
*** 682,687 ****
           << "\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)
          {
          os << "\nThe maximum number of reported warnings or errors has been "
--- 682,687 ----
           << "\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))
          {
          os << "\nThe maximum number of reported warnings or errors has been "



More information about the Cmake-commits mailing list