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:
Malte Langkabel
2020-02-14 16:34:04 +01:00
committed by GitHub
parent e5c1a118d7
commit a30f47e27f
112 changed files with 634 additions and 430 deletions
+6 -1
View File
@@ -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