summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Statistic.cpp
diff options
context:
space:
mode:
authorAnand Shukla <ashukla@cs.uiuc.edu>2002-10-04 23:56:18 +0000
committerAnand Shukla <ashukla@cs.uiuc.edu>2002-10-04 23:56:18 +0000
commit195d3fb37f6b08d83e4047a16609127d54cb0b0d (patch)
tree5c5155d03154f28534be2a0ebbc3c15c965d9cb4 /llvm/lib/Support/Statistic.cpp
parent8ea38b996bc00f4d9e34686a52409c1bf46dd7b7 (diff)
downloadbcm5719-llvm-195d3fb37f6b08d83e4047a16609127d54cb0b0d.tar.gz
bcm5719-llvm-195d3fb37f6b08d83e4047a16609127d54cb0b0d.zip
added cast to unsigned to compile with gcc3.2 (sparc)
llvm-svn: 4041
Diffstat (limited to 'llvm/lib/Support/Statistic.cpp')
-rw-r--r--llvm/lib/Support/Statistic.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Support/Statistic.cpp b/llvm/lib/Support/Statistic.cpp
index b6c75c2adee..4db949a99a2 100644
--- a/llvm/lib/Support/Statistic.cpp
+++ b/llvm/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...
OpenPOWER on IntegriCloud