[Cmake-commits] [cmake-commits] david.cole committed cmCacheManager.cxx 1.114 1.115 cmComputeLinkInformation.cxx 1.57 1.58 cmFileCommand.cxx 1.137 1.138 cmGlobalGenerator.cxx 1.258 1.259 cmStringCommand.cxx 1.29 1.30

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Sep 30 11:41:36 EDT 2009


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

Modified Files:
	cmCacheManager.cxx cmComputeLinkInformation.cxx 
	cmFileCommand.cxx cmGlobalGenerator.cxx cmStringCommand.cxx 
Log Message:
Fix warnings in CMake source code. Suppress warnings in Lexer and Parser files that are 'too hard' to fix.


Index: cmCacheManager.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCacheManager.cxx,v
retrieving revision 1.114
retrieving revision 1.115
diff -C 2 -d -r1.114 -r1.115
*** cmCacheManager.cxx	28 Sep 2009 15:41:57 -0000	1.114
--- cmCacheManager.cxx	30 Sep 2009 15:41:34 -0000	1.115
***************
*** 463,471 ****
         currentcwd[1] == ':' )
      {
!     currentcwd[0] = currentcwd[0] - 'A' + 'a';
      }
    cmSystemTools::ConvertToUnixSlashes(currentcwd);
    this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(),
!                       "This is the directory where this CMakeCahe.txt"
                        " was created", cmCacheManager::INTERNAL);
  
--- 463,473 ----
         currentcwd[1] == ':' )
      {
!     // Cast added to avoid compiler warning. Cast is ok because
!     // value is guaranteed to fit in char by the above if...
!     currentcwd[0] = static_cast<char>(currentcwd[0] - 'A' + 'a');
      }
    cmSystemTools::ConvertToUnixSlashes(currentcwd);
    this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(),
!                       "This is the directory where this CMakeCache.txt"
                        " was created", cmCacheManager::INTERNAL);
  

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.258
retrieving revision 1.259
diff -C 2 -d -r1.258 -r1.259
*** cmGlobalGenerator.cxx	28 Sep 2009 15:42:41 -0000	1.258
--- cmGlobalGenerator.cxx	30 Sep 2009 15:41:34 -0000	1.259
***************
*** 890,894 ****
      this->LocalGenerators[i]->GenerateTestFiles();
      this->CMakeInstance->UpdateProgress("Generating",
!                                     (i+1.0f)/this->LocalGenerators.size());
      }
    this->SetCurrentLocalGenerator(0);
--- 890,895 ----
      this->LocalGenerators[i]->GenerateTestFiles();
      this->CMakeInstance->UpdateProgress("Generating",
!       (static_cast<float>(i)+1.0f)/
!        static_cast<float>(this->LocalGenerators.size()));
      }
    this->SetCurrentLocalGenerator(0);
***************
*** 997,1001 ****
        }
      this->CMakeInstance->UpdateProgress
!       ("Configuring", 0.9f+0.1f*(i+1.0f)/this->LocalGenerators.size());
      }
  
--- 998,1003 ----
        }
      this->CMakeInstance->UpdateProgress
!       ("Configuring", 0.9f+0.1f*(static_cast<float>(i)+1.0f)/
!         static_cast<float>(this->LocalGenerators.size()));
      }
  
***************
*** 1263,1267 ****
  
    int numGen = atoi(numGenC);
!   float prog = 0.9f*this->LocalGenerators.size()/numGen;
    if (prog > 0.9f)
      {
--- 1265,1270 ----
  
    int numGen = atoi(numGenC);
!   float prog = 0.9f*static_cast<float>(this->LocalGenerators.size())/
!     static_cast<float>(numGen);
    if (prog > 0.9f)
      {

Index: cmComputeLinkInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.cxx,v
retrieving revision 1.57
retrieving revision 1.58
diff -C 2 -d -r1.57 -r1.58
*** cmComputeLinkInformation.cxx	28 Sep 2009 15:41:57 -0000	1.57
--- cmComputeLinkInformation.cxx	30 Sep 2009 15:41:34 -0000	1.58
***************
*** 988,993 ****
        {
        ret += "[";
!       ret += tolower(*s);
!       ret += toupper(*s);
        ret += "]";
        }
--- 988,993 ----
        {
        ret += "[";
!       ret += static_cast<char>(tolower(*s));
!       ret += static_cast<char>(toupper(*s));
        ret += "]";
        }

Index: cmStringCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmStringCommand.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -C 2 -d -r1.29 -r1.30
*** cmStringCommand.cxx	28 Sep 2009 15:42:49 -0000	1.29
--- cmStringCommand.cxx	30 Sep 2009 15:41:34 -0000	1.30
***************
*** 127,131 ****
        {
        std::string error = "Character with code ";
!       error += ch;
        error += " does not exist.";
        this->SetError(error.c_str());
--- 127,131 ----
        {
        std::string error = "Character with code ";
!       error += args[cc];
        error += " does not exist.";
        this->SetError(error.c_str());

Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.137
retrieving revision 1.138
diff -C 2 -d -r1.137 -r1.138
*** cmFileCommand.cxx	28 Sep 2009 15:42:30 -0000	1.137
--- cmFileCommand.cxx	30 Sep 2009 15:41:34 -0000	1.138
***************
*** 590,594 ****
        {
        // This is an ASCII character that may be part of a string.
!       s += c;
        }
      else
--- 590,596 ----
        {
        // This is an ASCII character that may be part of a string.
!       // Cast added to avoid compiler warning. Cast is ok because
!       // c is guaranteed to fit in char by the above if...
!       s += static_cast<char>(c);
        }
      else



More information about the Cmake-commits mailing list