diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2015-09-21 15:11:57 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-23 07:29:33 +0000 |
commit | 92c8d74c543aa94cd512369072975dca7006d5b3 (patch) | |
tree | eb7fe0edfa601a3062f3756274b26502021cdf69 /desktop/unx | |
parent | 3e27df1035677c7cca5200858d5d8e8283bf7aa9 (diff) |
CppCheck : reduce variables scope
Change-Id: Ief402017b693a4337f330fb07bb7a6dc6e749f72
Reviewed-on: https://gerrit.libreoffice.org/18753
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'desktop/unx')
-rw-r--r-- | desktop/unx/source/start.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c index ce856ec4704f..b9aa8285e0e7 100644 --- a/desktop/unx/source/start.c +++ b/desktop/unx/source/start.c @@ -105,7 +105,6 @@ child_spawn ( Args *args, sal_Bool bAllArgs, sal_Bool bWithStatus ) rtl_uString *pApp = NULL, *pTmp = NULL; rtl_uString **ppArgs; sal_uInt32 nArgs, i; - char buffer[64]; ChildInfo *info; int status_pipe[2]; oslProcessError nError; @@ -136,6 +135,8 @@ child_spawn ( Args *args, sal_Bool bAllArgs, sal_Bool bWithStatus ) if( bWithStatus ) { + char buffer[64]; + /* add the pipe arg */ snprintf (buffer, 63, "--splash-pipe=%d", status_pipe[1]); rtl_uString_newFromAscii( &pTmp, buffer ); @@ -754,7 +755,6 @@ void sigterm_handler(int ignored) SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) { - int fd = 0; sal_Bool bSentArgs = sal_False; const char* pUsePlugin; rtl_uString *pPipePath = NULL; @@ -794,6 +794,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) if ( !args->bInhibitPipe ) { + int fd = 0; pPipePath = get_pipe_path( args->pAppPath ); if ( ( fd = connect_pipe( pPipePath ) ) >= 0 ) |