summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/localize.cxx9
-rw-r--r--l10ntools/source/merge.cxx5
-rw-r--r--l10ntools/source/pocheck.cxx7
3 files changed, 17 insertions, 4 deletions
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 402403a8e5ea..17ad73f3b2a4 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -19,6 +19,7 @@
#include <sal/config.h>
+#include <cassert>
#include <cstddef>
#include <cstdlib>
#include <iostream>
@@ -90,12 +91,16 @@ void handleCommand(
OStringBuffer buf;
if (rExecutable == "uiex" || rExecutable == "hrcex")
{
- buf.append(OString(getenv("SRC_ROOT")));
+ auto const env = getenv("SRC_ROOT");
+ assert(env != nullptr);
+ buf.append(OString(env));
buf.append("/solenv/bin/");
}
else
{
- buf.append(OString(getenv("WORKDIR_FOR_BUILD")));
+ auto const env = getenv("WORKDIR_FOR_BUILD");
+ assert(env != nullptr);
+ buf.append(OString(env));
buf.append("/LinkTarget/Executable/");
}
buf.append(rExecutable.data());
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 75afdf77b9a6..b94bb7c84fc8 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -21,6 +21,7 @@
#include <sal/log.hxx>
#include <algorithm>
+#include <cassert>
#include <fstream>
#include <string>
#include <vector>
@@ -112,7 +113,9 @@ MergeDataFile::MergeDataFile(
const OString &rFileName, const OString &rFile,
bool bCaseSensitive, bool bWithQtz )
{
- OString sEnableReleaseBuild(getenv("ENABLE_RELEASE_BUILD"));
+ auto const env = getenv("ENABLE_RELEASE_BUILD");
+ assert(env != nullptr);
+ OString sEnableReleaseBuild(env);
std::ifstream aInputStream( rFileName.getStr() );
if ( !aInputStream.is_open() )
diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 1e7c951863be..0dcb2d0dcef9 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -7,6 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <cassert>
#include <iostream>
#include <map>
#include <vector>
@@ -395,7 +398,9 @@ int main()
{
try
{
- OString aLanguages(getenv("ALL_LANGS"));
+ auto const env = getenv("ALL_LANGS");
+ assert(env != nullptr);
+ OString aLanguages(env);
if( aLanguages.isEmpty() )
{
std::cerr << "Usage: LD_LIBRARY_PATH=instdir/program make cmd cmd=workdir/LinkTarget/Executable/pocheck\n";