Change char* to const char* to fix warnings
This commit is contained in:
parent
b2d131c143
commit
8a4db98e2b
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user