summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2015-08-21 13:52:14 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-08-21 22:25:03 +0000
commit373e71ee65a90daa9a27ff5bb7a3d6c867e4f393 (patch)
treeceba77dcc99d5fce0f9ba2a2e56c8c69af8d3987 /extensions
parentd0489d0827fc6cef04d0f3602023d82ceda82480 (diff)
tdf#39440 reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: I97726ed32e5aa92e7da7d248380a78b1b201e46e Reviewed-on: https://gerrit.libreoffice.org/17912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/activex/so_activex.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/extensions/source/activex/so_activex.cxx b/extensions/source/activex/so_activex.cxx
index 45c9174610c4..2a73949cb01e 100644
--- a/extensions/source/activex/so_activex.cxx
+++ b/extensions/source/activex/so_activex.cxx
@@ -217,9 +217,6 @@ STDAPI DllRegisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAc
int ind;
const char* aPrefix = aLocalPrefix; // bForAllUsers ? "" : aLocalPrefix;
- char pActiveXPath[1124];
- char pActiveXPath101[1124];
-
// In case SO7 is installed for this user he can have local registry entries that will prevent him from
// using SO8 ActiveX control. The fix is just to clean up the local entries related to ActiveX control.
@@ -229,6 +226,9 @@ STDAPI DllRegisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAc
if ( pProgramPath && strlen( pProgramPath ) < 1024 )
{
+ char pActiveXPath[1124];
+ char pActiveXPath101[1124];
+
sprintf( pActiveXPath, "%s\\%s", pProgramPath, pLibName );
sprintf( pActiveXPath101, "%s\\%s, 101", pProgramPath, pLibName );
@@ -660,7 +660,6 @@ STDAPI DllUnregisterServerDoc( int nMode, BOOL bForAllUsers, BOOL bFor64Bit )
STDAPI DllRegisterServer()
{
- char pProgramPath[1024];
HRESULT aResult = E_FAIL;
HMODULE aCurModule = GetModuleHandleA( bX64 ? X64_LIB_NAME : X32_LIB_NAME );
@@ -669,6 +668,7 @@ STDAPI DllRegisterServer()
if( aCurModule )
{
+ char pProgramPath[1024];
DWORD nLen = GetModuleFileNameA( aCurModule, pProgramPath, 1024 );
if ( nLen && nLen > nLibNameLen + 1 )
{