kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0156-CppCheck-reduce-variables-scope.patch

f325b2
From 01673b7cf6bb0abbd35ff79b50dc15b14bacad70 Mon Sep 17 00:00:00 2001
f325b2
From: =?UTF-8?q?Micha=C3=ABl=20Lef=C3=A8vre?= <lefevre00@yahoo.fr>
f325b2
Date: Mon, 21 Sep 2015 15:11:57 +0200
f325b2
Subject: [PATCH 156/398] CppCheck : reduce variables scope
f325b2
MIME-Version: 1.0
f325b2
Content-Type: text/plain; charset=UTF-8
f325b2
Content-Transfer-Encoding: 8bit
f325b2
f325b2
Reviewed-on: https://gerrit.libreoffice.org/18753
f325b2
Tested-by: Jenkins <ci@libreoffice.org>
f325b2
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
f325b2
Tested-by: Caolán McNamara <caolanm@redhat.com>
f325b2
(cherry picked from commit 92c8d74c543aa94cd512369072975dca7006d5b3)
f325b2
f325b2
Change-Id: Ief402017b693a4337f330fb07bb7a6dc6e749f72
f325b2
---
f325b2
 desktop/source/lib/init.cxx | 3 ++-
f325b2
 1 file changed, 2 insertions(+), 1 deletion(-)
f325b2
f325b2
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
f325b2
index 64a6c00ffba6..1b06c4220564 100644
f325b2
--- a/desktop/source/lib/init.cxx
f325b2
+++ b/desktop/source/lib/init.cxx
f325b2
@@ -566,7 +566,6 @@ static void doc_iniUnoCommands ()
f325b2
     };
f325b2
 
f325b2
     util::URL aCommandURL;
f325b2
-    const SfxSlot* pSlot = NULL;
f325b2
     SfxViewShell* pViewShell = SfxViewShell::Current();
f325b2
     SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): NULL;
f325b2
 
f325b2
@@ -582,6 +581,8 @@ static void doc_iniUnoCommands ()
f325b2
 
f325b2
     for (sal_uInt32 nIterator = 0; nIterator < SAL_N_ELEMENTS(sUnoCommands); nIterator++)
f325b2
     {
f325b2
+        const SfxSlot* pSlot = NULL;
f325b2
+
f325b2
         aCommandURL.Complete = sUnoCommands[nIterator];
f325b2
         xParser->parseStrict(aCommandURL);
f325b2
         pSlot = rSlotPool.GetUnoSlot(aCommandURL.Path);
f325b2
-- 
f325b2
2.12.0
f325b2