diff --git a/lib/Support/Statistic.cpp b/lib/Support/Statistic.cpp
index b6c75c2adee..4db949a99a2 100644
--- a/lib/Support/Statistic.cpp
+++ b/lib/Support/Statistic.cpp
@@ -70,8 +70,10 @@ void StatisticBase::destroy() const {
     // Figure out how long the biggest Value and Name fields are...
     unsigned MaxNameLen = 0, MaxValLen = 0;
     for (unsigned i = 0, e = AccumStats->size(); i != e; ++i) {
-      MaxValLen = std::max(MaxValLen, (*AccumStats)[i].Value.length());
-      MaxNameLen = std::max(MaxNameLen, std::strlen((*AccumStats)[i].Name));
+      MaxValLen = std::max(MaxValLen, 
+                           (unsigned)(*AccumStats)[i].Value.length());
+      MaxNameLen = std::max(MaxNameLen, 
+                            (unsigned)std::strlen((*AccumStats)[i].Name));
     }
 
     // Sort the fields...
diff --git a/support/lib/Support/Statistic.cpp b/support/lib/Support/Statistic.cpp
index b6c75c2adee..4db949a99a2 100644
--- a/support/lib/Support/Statistic.cpp
+++ b/support/lib/Support/Statistic.cpp
@@ -70,8 +70,10 @@ void StatisticBase::destroy() const {
     // Figure out how long the biggest Value and Name fields are...
     unsigned MaxNameLen = 0, MaxValLen = 0;
     for (unsigned i = 0, e = AccumStats->size(); i != e; ++i) {
-      MaxValLen = std::max(MaxValLen, (*AccumStats)[i].Value.length());
-      MaxNameLen = std::max(MaxNameLen, std::strlen((*AccumStats)[i].Name));
+      MaxValLen = std::max(MaxValLen, 
+                           (unsigned)(*AccumStats)[i].Value.length());
+      MaxNameLen = std::max(MaxNameLen, 
+                            (unsigned)std::strlen((*AccumStats)[i].Name));
     }
 
     // Sort the fields...