Hi,
further warning cleaning within binfilter.

Whoever has written this liked shadowing. I got
{
    var a    <---- warning shadowing this
    {
        var a  <--- warning shadowing a
    }
}

which are nice to sort out !!!

I review twice these patches before sending, but I fear to have missed
some points. Due to shadowing "this", the compiler does not complain if
I miss a parameter within the shadowed scope. I hope my IDE helped
enough to catch my human failure.

Learning with experiences, from now, not yet done consistently within
this patch series, I will proceed following this pattern:

as soon as I get a variable aaa shadowing this
-> replace all aaa with aaa0 independently if this variable is shadowing
or not (maybe I rename also a variable within a function, where there is
not shadowing)
  -> for following shadowing, increase the postfix with aaa1, aaa2,..

this will make slightly bigger diff, but will reduce the error
possibilities, since the compiler will complain for a aaa0 which was out
of the shadowed scope.

I hope this kind of approach is OK for you

regards
Pierre-André
>From 92ecf08e376e87d1d8075edaa37762c6ec244d6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= <pjacq...@alumni.ethz.ch>
Date: Fri, 26 Nov 2010 19:17:56 +0100
Subject: [PATCH 1/7] warning cleaing binfilter sw3io

based on
sw_sw3nodes.cxx:: warning: comparison is always false due to limited range of data type
---
 binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx
index 20ad31b..c6fdf62 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx
@@ -1900,12 +1900,7 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )//STRIP008 ;
 /*N*/ 		// der Header
 /*N*/ 		cFlags = 0x04;	// 4 Bytes Daten
 /*N*/ 		xub_StrLen nBegin = pWrong->GetBeginInv();
-/*N*/ 		if( nBegin > STRING_MAXLEN52 )
-/*N*/ 			nBegin = STRING_MAXLEN52;
-/*N*/ 
 /*N*/ 		xub_StrLen nEnd = pWrong->GetEndInv();
-/*N*/ 		if( nEnd > STRING_MAXLEN52 )
-/*N*/ 			nEnd = STRING_MAXLEN52;
 /*N*/ 
 /*N*/ 		*pStrm << cFlags
 /*N*/ 			   << (UINT16)nBegin
-- 
1.7.1

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to