diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-06-13 10:09:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-15 13:34:14 +0200 |
commit | 4ea281a3ccb5bd21e1808d8cb127a91a1bb72691 (patch) | |
tree | 183a2ab634d770b7ef777323fa6851fc38e14011 /jvmfwk | |
parent | 943f4b4ff1c524c514584c459b899ba3e9dfb71f (diff) |
cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx | 3 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 14 |
2 files changed, 7 insertions, 10 deletions
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 5513d569fb6d..f1ef2cd38aff 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) |