summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-01 09:59:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-01 10:56:14 +0100
commit5ace3f3b4f2f916d8b2acab1b5cc0fe2a5a19dee (patch)
tree00cdcfc6ef33bc558bda62935d46377f033975d6 /jvmfwk
parent62cb50fd9b97358114dcc4d0c1afdcdd04341b0c (diff)
clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx7
-rw-r--r--jvmfwk/source/elements.cxx2
2 files changed, 4 insertions, 5 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index ef91401308d1..cffb0b3b1428 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -40,6 +40,7 @@
#include "rtl/ustrbuf.hxx"
#include "osl/module.hxx"
#include "osl/mutex.hxx"
+#include "osl/process.h"
#include "osl/thread.hxx"
#include "osl/file.hxx"
#include "rtl/instance.hxx"
@@ -634,13 +635,11 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
#if defined UNX && !defined MACOSX
//Setting the JAVA_HOME is needed for awt
- OUString javaHome("JAVA_HOME=");
+ OUString javaHome("JAVA_HOME");
OUString sPathLocation;
osl_getSystemPathFromFileURL(pInfo->sLocation, & sPathLocation.pData);
javaHome += sPathLocation;
- OString osJavaHome = OUStringToOString(
- javaHome, osl_getThreadTextEncoding());
- putenv(strdup(osJavaHome.getStr()));
+ osl_setEnvironment(javaHome.pData, javaHome.pData);
#endif
typedef jint JNICALL JNI_CreateVM_Type(JavaVM **, JNIEnv **, void *);
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 0adc5931d1d6..55cdfa7213b0 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -1126,7 +1126,7 @@ void MergedSettings::getJRELocations(
rtl_uString *** parLocations, sal_Int32 * size) const
{
osl::MutexGuard guard(FwkMutex::get());
- OSL_ASSERT(parLocations != NULL && size != NULL);
+ assert(parLocations != NULL && size != NULL);
*parLocations = (rtl_uString **)
rtl_allocateMemory(sizeof(rtl_uString*) * m_JRELocations.size());