summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2014-12-11 23:32:12 +0100
committerNoel Grandin <noelgrandin@gmail.com>2014-12-12 08:08:11 +0000
commit04b183a9bc792a53a9f081353a79486faa4f3872 (patch)
tree62a467485cc0f03f1d32998b362707f15b07bee0 /desktop/source
parentf5c5bab09f2e3a7e13a6b397faf4bdfcb898f295 (diff)
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: Ifbc5a7a562e714f48dcfd51a75e9a4e0bfcde81c Reviewed-on: https://gerrit.libreoffice.org/13443 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx3
2 files changed, 2 insertions, 3 deletions
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 5c1375541876..26018f42caac 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1307,10 +1307,10 @@ BackendImpl::ComponentPackageImpl::isRegistered_(
if (m_registered == REG_UNINIT)
{
m_registered = REG_NOT_REGISTERED;
- bool bAmbiguousComponentName = false;
const Reference<registry::XSimpleRegistry> xRDB( getRDB() );
if (xRDB.is())
{
+ bool bAmbiguousComponentName = false;
// lookup rdb for location URL:
const Reference<registry::XRegistryKey> xRootKey(
xRDB->getRootKey() );
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 04dcac8fccc7..5bef9ed301ec 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -187,7 +187,6 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
bool option_verbose = false;
bool option_bundled = false;
bool option_suppressLicense = false;
- bool subcmd_add = false;
bool subcmd_gui = false;
OUString logFile;
OUString repository;
@@ -239,7 +238,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
osl_getCommandArg( nPos, &subCommand.pData );
++nPos;
subCommand = subCommand.trim();
- subcmd_add = subCommand == "add";
+ bool subcmd_add = subCommand == "add";
subcmd_gui = subCommand == "gui";
// sun-command options and packages: