[PATCH] cppcheck: reduce scope of variable 'nTab'

Thomas Arnhold thomas at arnhold.org
Sun Jan 16 14:15:10 PST 2011


---
 sc/source/core/tool/address.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 0d4a70c..d267b4a 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -905,10 +905,10 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
     tmp1 = lcl_a1_get_col( p, &r.aEnd, &nFlags2 );
     if( !tmp1 && !aEndTabName.Len() )     // Probably the aEndTabName was specified after the first range
     {
-        SCTAB nTab = 0;
         p = lcl_XL_ParseSheetRef( p, aEndTabName, false, NULL );
         if( p )
         {
+            SCTAB nTab = 0;
             if( aEndTabName.Len() && pDoc->GetTable( aEndTabName, nTab ) )
             {
                 r.aEnd.SetTab( nTab );
-- 
1.7.3.5


--------------080604050900010603030201
Content-Type: text/plain;
 name="0003-cppcheck:-remove-unused-variable-'pEditSel'.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0003-cppcheck:-remove-unused-variable-'pEditSel'.patch"



More information about the LibreOffice mailing list