diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-01 09:59:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-01 10:56:14 +0100 |
commit | 5ace3f3b4f2f916d8b2acab1b5cc0fe2a5a19dee (patch) | |
tree | 00cdcfc6ef33bc558bda62935d46377f033975d6 /jvmfwk/plugins/sunmajor/pluginlib | |
parent | 62cb50fd9b97358114dcc4d0c1afdcdd04341b0c (diff) |
clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
Diffstat (limited to 'jvmfwk/plugins/sunmajor/pluginlib')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 7 |
1 files changed, 3 insertions, 4 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 *); |