build: Treat warnings as errors (#923)
* squash and rebase andronov-alexey:treat_warnings_as_errors from pull request #850 * fix remaining warnings in java lib
This commit is contained in:
@@ -188,7 +188,10 @@ std::vector<FilePath> getClassPath(
|
||||
|
||||
void setJavaHomeVariableIfNotExists()
|
||||
{
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
if (getenv("JAVA_HOME") == nullptr)
|
||||
#pragma warning(pop)
|
||||
{
|
||||
const FilePath javaPath = ApplicationSettings::getInstance()->getJavaPath();
|
||||
const FilePath javaHomePath =
|
||||
@@ -197,8 +200,10 @@ void setJavaHomeVariableIfNotExists()
|
||||
LOG_WARNING(
|
||||
"Environment variable \"JAVA_HOME\" not found on system. Setting value to \"" +
|
||||
javaHomePath.str() + "\" for this process.");
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
putenv(const_cast<char*>(("JAVA_HOME=" + javaHomePath.str()).c_str()));
|
||||
#pragma warning(pop)
|
||||
}
|
||||
}
|
||||
} // namespace utility
|
||||
|
||||
Reference in New Issue
Block a user