ENH: fix warnings

This commit is contained in:
Bill Hoffman 2008-02-01 12:35:50 -05:00
parent d94087ab44
commit 15741325e0

View File

@ -2210,7 +2210,7 @@ int SystemInformationImplementation::RetreiveInformationFromCpuInfoFile()
// L1 Cache size // L1 Cache size
kwsys_stl::string cacheSize = this->ExtractValueFromCpuInfoFile(buffer,"cache size"); kwsys_stl::string cacheSize = this->ExtractValueFromCpuInfoFile(buffer,"cache size");
pos = cacheSize.find(" KB"); pos = cacheSize.find(" KB");
if(pos!=-1) if(pos!=cacheSize.npos)
{ {
cacheSize = cacheSize.substr(0,pos); cacheSize = cacheSize.substr(0,pos);
} }
@ -2834,7 +2834,7 @@ kwsys_stl::string SystemInformationImplementation::ParseValueFromKStat(const cha
// Remove the quotes if any // Remove the quotes if any
size_t quotes = arg.find('"'); size_t quotes = arg.find('"');
while(quotes != -1) while(quotes != arg.npos)
{ {
arg.erase(quotes,1); arg.erase(quotes,1);
quotes = arg.find('"'); quotes = arg.find('"');