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  2ab68c76218215ef673856d33693b7adc9592500 (commit)
       via  db7c9def4ebd0c43d2d08c5144471c829e6b4323 (commit)
      from  e210e5ac17af28e1066f155851a280d893c4eee1 (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=2ab68c76218215ef673856d33693b7adc9592500
commit 2ab68c76218215ef673856d33693b7adc9592500
Merge: e210e5a db7c9de
Author:     Nils Gladitz <nilsglad...@gmail.com>
AuthorDate: Thu Aug 28 09:13:37 2014 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Aug 28 09:13:37 2014 -0400

    Merge topic 'string-uuid' into next
    
    db7c9def StringUuid: Avoid integer conversion warnings


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db7c9def4ebd0c43d2d08c5144471c829e6b4323
commit db7c9def4ebd0c43d2d08c5144471c829e6b4323
Author:     Nils Gladitz <nilsglad...@gmail.com>
AuthorDate: Thu Aug 28 15:12:46 2014 +0200
Commit:     Nils Gladitz <nilsglad...@gmail.com>
CommitDate: Thu Aug 28 15:12:46 2014 +0200

    StringUuid: Avoid integer conversion warnings

diff --git a/Source/cmUuid.cxx b/Source/cmUuid.cxx
index 8728020..8b5b7ae 100644
--- a/Source/cmUuid.cxx
+++ b/Source/cmUuid.cxx
@@ -76,13 +76,15 @@ void cmUuid::CreateHashInput(std::vector<unsigned char> 
const& uuidNamespace,
 }
 
 std::string cmUuid::FromDigest(
-  const unsigned char* digest, int version) const
+  const unsigned char* digest, unsigned char version) const
 {
-  unsigned char uuid[16] = {0};
+  typedef unsigned char byte_t;
+
+  byte_t uuid[16] = {0};
   memcpy(uuid, digest, 16);
 
   uuid[6] &= 0xF;
-  uuid[6] |= (version << 4);
+  uuid[6] |= byte_t(version << 4);
 
   uuid[8] &= 0x3F;
   uuid[8] |= 0x80;
@@ -134,7 +136,7 @@ std::string cmUuid::BinaryToString(const unsigned char* 
input) const
     size_t bytes = this->Groups[i];
     for(size_t j = 0; j < bytes; ++j)
       {
-      int byte = input[inputIndex++];
+      unsigned char byte = input[inputIndex++];
       output += this->ByteToHex(byte);
       }
     }
@@ -142,17 +144,17 @@ std::string cmUuid::BinaryToString(const unsigned char* 
input) const
   return output;
 }
 
-std::string cmUuid::ByteToHex(int byte) const
+std::string cmUuid::ByteToHex(unsigned char byte) const
 {
   std::string result;
   for(int i = 0; i < 2; ++i)
     {
-    int rest = byte % 16;
+    unsigned char rest = byte % 16;
     byte /= 16;
 
     char c = (rest < 0xA) ?
-      '0' + rest :
-      'a' + (rest - 0xA);
+      char('0' + rest) :
+      char('a' + (rest - 0xA));
 
     result = c + result;
     }
@@ -192,17 +194,17 @@ bool cmUuid::IntFromHexDigit(char input, char& output) 
const
 {
   if(input >= '0' && input <= '9')
     {
-    output = input - '0';
+    output = char(input - '0');
     return true;
     }
   else if(input >= 'a' && input <= 'f')
     {
-    output = input - 'a' + 0xA;
+    output = char(input - 'a' + 0xA);
     return true;
     }
   else if(input >= 'A' && input <= 'F')
     {
-    output = input - 'A' + 0xA;
+    output = char(input - 'A' + 0xA);
     return true;
     }
   else
diff --git a/Source/cmUuid.h b/Source/cmUuid.h
index 678d652..0dda357 100644
--- a/Source/cmUuid.h
+++ b/Source/cmUuid.h
@@ -33,12 +33,13 @@ public:
     std::vector<unsigned char> &output) const;
 
 private:
-  std::string ByteToHex(int byte) const;
+  std::string ByteToHex(unsigned char byte) const;
 
   void CreateHashInput(std::vector<unsigned char> const& uuidNamespace,
     std::string const& name, std::vector<unsigned char> &output) const;
 
-  std::string FromDigest(const unsigned char* digest, int version) const;
+  std::string FromDigest(const unsigned char* digest,
+    unsigned char version) const;
 
   bool StringToBinaryImpl(std::string const& input,
     std::vector<unsigned char> &output) const;

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

Summary of changes:
 Source/cmUuid.cxx |   24 +++++++++++++-----------
 Source/cmUuid.h   |    5 +++--
 2 files changed, 16 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to