diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2015-08-22 11:58:11 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-08-22 13:02:08 +0000 |
commit | 25accda781bc0bc79ca2e887c54ca981068bf407 (patch) | |
tree | 0f551b4f516dd289df523d71bff08a26de2c3622 /jvmfwk | |
parent | 159bace378aefa5e48967f1e5089acef9a7f2378 (diff) |
tdf#39440 reduce scope of local variables
This addresses some cppcheck warnings.
Change-Id: I6ab170c4426494ab9fc53017f88e47fbfdbd9aad
Reviewed-on: https://gerrit.libreoffice.org/17920
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 2 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 44a902091144..634f65ba45f6 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -117,7 +117,6 @@ OString getPluginJarPath( } else { - char sep[] = {SAL_PATHSEPARATOR, 0}; OUString sName(sLocation + "/lib/" + sName1); OUString sPath1; OUString sPath2; @@ -128,6 +127,7 @@ OString getPluginJarPath( if (osl_getSystemPathFromFileURL(sName.pData, & sPath2.pData) == osl_File_E_None) { + char sep[] = {SAL_PATHSEPARATOR, 0}; sPath = sPath1 + OUString::createFromAscii(sep) + sPath2; } } diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 9a60c3a9232a..b378dbfc0f78 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -647,11 +647,11 @@ bool getJavaInfoFromRegistry(const wchar_t* szRegKey, OUString usHome((sal_Unicode*) szTmpPath); // check if there is already an entry with the same JavaHomeruntime lib // if so, we use the one with the more accurate version - bool bAppend= true; OUString usHomeUrl; if (osl_getFileURLFromSystemPath(usHome.pData, & usHomeUrl.pData) == osl_File_E_None) { + bool bAppend= true; //iterate over the vector with java home strings typedef vector<OUString>::iterator ItHome; for(ItHome itHome= vecJavaHome.begin(); |