diff options
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 9 |
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); |