[Cmake-commits] CMake branch, next, updated. v2.8.1-1506-g358773f

Brad King brad.king at kitware.com
Fri Jun 25 09:06:44 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  358773feafe7acb4305038ed53d79c854348bc2d (commit)
       via  6fc4cd86806b349c804cf9dacb2dd04c289a684f (commit)
       via  da0190a4a7511b33e6c373b735ccd2e132e083e5 (commit)
      from  e87eaf1dff54222ab0f78521dc01dd3492a51668 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=358773feafe7acb4305038ed53d79c854348bc2d
commit 358773feafe7acb4305038ed53d79c854348bc2d
Merge: e87eaf1 6fc4cd8
Author: Brad King <brad.king at kitware.com>
Date:   Fri Jun 25 09:06:18 2010 -0400

    Merge branch 'fix-cmake-conversion-warnings' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fc4cd86806b349c804cf9dacb2dd04c289a684f
commit 6fc4cd86806b349c804cf9dacb2dd04c289a684f
Author: Brad King <brad.king at kitware.com>
Date:   Fri Jun 25 08:48:59 2010 -0400

    Fix or cast integer conversions in cmake
    
    These were revealed by GCC's -Wconversion option.  Fix types where it is
    easy to do so.  Cast in cases we know the integer will not be truncated.

diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 147f6ac..c198727 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -576,7 +576,7 @@ unsigned int cmELFInternalImpl<Types>::GetDynamicEntryCount()
       return i;
       }
     }
-  return this->DynamicSectionEntries.size();
+  return static_cast<unsigned int>(this->DynamicSectionEntries.size());
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index b687fe1..4e8e7e6 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -750,8 +750,9 @@ cmGlobalUnixMakefileGenerator3
                                 cmLocalGenerator::FULL,
                                 cmLocalGenerator::SHELL);
         progCmd << " ";
-        std::vector<int> &progFiles = this->ProgressMap[&t->second].Marks;
-        for (std::vector<int>::iterator i = progFiles.begin();
+        std::vector<unsigned long>& progFiles =
+          this->ProgressMap[&t->second].Marks;
+        for (std::vector<unsigned long>::iterator i = progFiles.begin();
               i != progFiles.end(); ++i)
           {
           progCmd << " " << *i;
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 401888f..f499536 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -177,7 +177,7 @@ protected:
     TargetProgress(): NumberOfActions(0) {}
     unsigned long NumberOfActions;
     std::string VariableFile;
-    std::vector<int> Marks;
+    std::vector<unsigned long> Marks;
     void WriteProgressVariables(unsigned long total, unsigned long& current);
   };
   struct ProgressMapCompare { bool operator()(cmTarget*,cmTarget*) const; };
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 3bd47a4..19f5c0f 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -739,7 +739,7 @@ bool cmStringCommand
     alphabet = cmStringCommandDefaultAlphabet;
     }
 
-  double sizeofAlphabet = alphabet.size();
+  double sizeofAlphabet = static_cast<double>(alphabet.size());
   if ( sizeofAlphabet < 1 )
     {
     this->SetError("sub-command RANDOM invoked with bad alphabet.");
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 5f7cfa3..5be53c2 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1204,6 +1204,7 @@ bool cmSystemTools::ComputeFileMD5(const char* source, char* md5out)
   // Should be efficient enough on most system:
   const int bufferSize = 4096;
   char buffer[bufferSize];
+  unsigned char const* buffer_uc = reinterpret_cast<unsigned char const*>(buffer);
   // This copy loop is very sensitive on certain platforms with
   // slightly broken stream libraries (like HPUX).  Normally, it is
   // incorrect to not check the error condition on the fin.read()
@@ -1212,10 +1213,9 @@ bool cmSystemTools::ComputeFileMD5(const char* source, char* md5out)
   while(fin)
     {
     fin.read(buffer, bufferSize);
-    if(fin.gcount())
+    if(int gcount = static_cast<int>(fin.gcount()))
       {
-      cmsysMD5_Append(md5, reinterpret_cast<unsigned char const*>(buffer), 
-                      fin.gcount());
+      cmsysMD5_Append(md5, buffer_uc, gcount);
       }
     }
   cmsysMD5_FinalizeHex(md5, md5out);
diff --git a/Source/cm_utf8.c b/Source/cm_utf8.c
index 3d4ca16..9c11f2b 100644
--- a/Source/cm_utf8.c
+++ b/Source/cm_utf8.c
@@ -50,7 +50,7 @@ const char* cm_utf8_decode_character(const char* first, const char* last,
                                      unsigned int* pc)
 {
   /* Count leading ones in the first byte.  */
-  unsigned char c = *first++;
+  unsigned char c = (unsigned char)*first++;
   unsigned char const ones = cm_utf8_ones[c];
   switch(ones)
     {
@@ -65,7 +65,7 @@ const char* cm_utf8_decode_character(const char* first, const char* last,
   unsigned char left;
   for(left = ones-1; left && first != last; --left)
     {
-    c = *first++;
+    c = (unsigned char)*first++;
     if(cm_utf8_ones[c] != 1)
       {
       return 0;

-----------------------------------------------------------------------

Summary of changes:
 Source/cmELF.cxx                          |    2 +-
 Source/cmGlobalUnixMakefileGenerator3.cxx |    5 +++--
 Source/cmGlobalUnixMakefileGenerator3.h   |    2 +-
 Source/cmStringCommand.cxx                |    2 +-
 Source/cmSystemTools.cxx                  |    6 +++---
 Source/cm_utf8.c                          |    4 ++--
 Source/kwsys/kwsysDateStamp.cmake         |    2 +-
 7 files changed, 12 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list