summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-10-01 20:47:08 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-10-01 20:47:08 (GMT)
commit44bcba746156ad1d5fe7f784380c3fb4f4672f6b (patch)
tree34028a688c7649519a6a1086949f859d75a1a63f /Source/cmSystemTools.cxx
parent86459a89a10733bad549c34a4c4c0ca962397bc6 (diff)
downloadCMake-44bcba746156ad1d5fe7f784380c3fb4f4672f6b.zip
CMake-44bcba746156ad1d5fe7f784380c3fb4f4672f6b.tar.gz
CMake-44bcba746156ad1d5fe7f784380c3fb4f4672f6b.tar.bz2
Fix warnings in CMake source code. Suppress rampant warnings emanating from Qt files.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index bf82981..0af46c1 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -338,7 +338,7 @@ bool cmSystemTools::IsOn(const char* val)
for(std::basic_string<char>::iterator c = v.begin();
c != v.end(); c++)
{
- *c = toupper(*c);
+ *c = static_cast<char>(toupper(*c));
}
return (v == "ON" || v == "1" || v == "YES" || v == "TRUE" || v == "Y");
}
@@ -371,7 +371,7 @@ bool cmSystemTools::IsOff(const char* val)
for(std::basic_string<char>::iterator c = v.begin();
c != v.end(); c++)
{
- *c = toupper(*c);
+ *c = static_cast<char>(toupper(*c));
}
return (v == "OFF" || v == "0" || v == "NO" || v == "FALSE" ||
v == "N" || cmSystemTools::IsNOTFOUND(v.c_str()) || v == "IGNORE");
@@ -915,7 +915,8 @@ bool RunCommandViaPopen(const char* command,
#endif
return false;
}
- fgets(buffer, BUFFER_SIZE, cpipe);
+ buffer[0] = 0;
+ (void) fgets(buffer, BUFFER_SIZE, cpipe);
while(!feof(cpipe))
{
if(verbose)
@@ -924,7 +925,7 @@ bool RunCommandViaPopen(const char* command,
}
output += buffer;
buffer[0] = 0;
- fgets(buffer, BUFFER_SIZE, cpipe);
+ (void) fgets(buffer, BUFFER_SIZE, cpipe);
}
retVal = pclose(cpipe);