summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-06-13 10:09:21 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-02-06 09:12:12 -0500
commit294c613da65793bc90e24c7d1339091669f9be07 (patch)
tree79d72720bedd6f8b4e4ec0eaa06e57919450a4db /jvmfwk
parentaadf1b51bb8f489b8aa3fb9e6cc5290ee0164bd2 (diff)
cppcheck:redundantAssignment
(cherry picked from commit 4ea281a3ccb5bd21e1808d8cb127a91a1bb72691) Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx14
2 files changed, 7 insertions, 10 deletions
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index f179bdec7644..7c249d31844a 100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -51,9 +51,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
fprintf(stdout, HELP_TEXT);// default
return 0;
}
- javaFrameworkError errcode = JFW_E_NONE;
sal_Bool bEnabled = sal_False;
- errcode = jfw_getEnabled( & bEnabled);
+ javaFrameworkError errcode = jfw_getEnabled( & bEnabled);
if (errcode == JFW_E_NONE && bEnabled == sal_False)
{
//Do not do any preparation because that may only slow startup time.
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index c72668d78070..66bfde5f02e6 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -441,11 +441,16 @@ bool getJavaProps(const OUString & exePath,
sClassPath += "/../Resources/java";
#endif
+#ifdef UNX
+ // Java is no longer required for a11y - we use atk directly.
+ bool bNoAccessibility = !isEnvVarSetToOne("JFW_PLUGIN_FORCE_ACCESSIBILITY");
+#else
//check if we shall examine a Java for accessibility support
//If the bootstrap variable is "1" then we pass the argument
//"noaccessibility" to JREProperties.class. This will prevent
//that it calls java.awt.Toolkit.getDefaultToolkit();
bool bNoAccessibility = isEnvVarSetToOne("JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY");
+#endif
//prepare the arguments
sal_Int32 cArgs = 3;
@@ -454,12 +459,6 @@ bool getJavaProps(const OUString & exePath,
OUString arg3("JREProperties");
OUString arg4 = "noaccessibility";
rtl_uString *args[4] = {arg1.pData, arg2.pData, arg3.pData};
-
-#ifdef UNX
- // Java is no longer required for a11y - we use atk directly.
- bNoAccessibility = !isEnvVarSetToOne("JFW_PLUGIN_FORCE_ACCESSIBILITY");
-#endif
-
// Only add the fourth param if the bootstrap parameter is set.
if (bNoAccessibility)
{
@@ -624,9 +623,8 @@ bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
DWORD dwIndex = 0;
const DWORD BUFFSIZE = 1024;
wchar_t bufVersion[BUFFSIZE];
- DWORD nNameLen = BUFFSIZE;
FILETIME fileTime;
- nNameLen = sizeof(bufVersion);
+ DWORD nNameLen = sizeof(bufVersion);
// Iterate over all subkeys of HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment
while (RegEnumKeyExW(hRoot, dwIndex, bufVersion, &nNameLen, NULL, NULL, NULL, &fileTime) != ERROR_NO_MORE_ITEMS)