Change char* to const char* to fix warnings

This commit is contained in:
Robert Osfield 2007-08-26 09:59:39 +00:00
parent b2d131c143
commit 8a4db98e2b

View File

@ -258,7 +258,7 @@ void ApplicationUsage::writeEnvironmentSettings(std::ostream& output)
std::string::size_type len = citr->first.find_first_of("\n\r\t ");
if (len == std::string::npos) len = citr->first.size();
line.replace(optionPos,len,citr->first.substr(0,len));
char *cp = getenv(citr->first.substr(0, len).c_str());
const char *cp = getenv(citr->first.substr(0, len).c_str());
if (!cp) cp = "[not set]";
else if (!*cp) cp = "[set]";
line += std::string(cp) + "\n";