[PATCH 9/9] binfilter sw3io warning fixes

Pierre-André Jacquod pjacquod at alumni.ethz.ch
Thu Nov 25 12:10:27 PST 2010


use of not initialized variables
---
 binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx
index 16c641a..3606f9b 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx
@@ -310,7 +310,7 @@ sal_Bool lcl_sw3io_insFtn( const SwTxtNode *pTxtNd )
 /*N*/ 	if( rSet.Count() )
 /*N*/ 	{
 /*N*/ 		// Beim 3.1 Export den aktuellen Attrset merken
-/*N*/ 		const SfxItemSet *pOldExportItemSet;
+/*N*/ 		const SfxItemSet *pOldExportItemSet = NULL;
 /*N*/ 		if( pExportInfo )
 /*N*/ 		{
 /*N*/ 			pOldExportItemSet = pExportInfo->pItemSet;
@@ -938,21 +938,21 @@ sal_Bool lcl_sw3io_insFtn( const SwTxtNode *pTxtNd )
 /*N*/ 	if( bWriteName )
 /*N*/ 		OutString( *pStrm, rFmt.GetName() );
 /*N*/ 
-/*N*/ 	BOOL bOldExportFlyFrmFmt;
-/*N*/ 	const SwFlyFrm* pOldExportFlyFrm;
 /*N*/ 	if( pExportInfo )
 /*N*/ 	{
-/*N*/ 		bOldExportFlyFrmFmt = pExportInfo->bFlyFrmFmt;
-/*N*/ 		pOldExportFlyFrm = pExportInfo->pFlyFrm;
+/*N*/ 		BOOL bOldExportFlyFrmFmt = pExportInfo->bFlyFrmFmt;
+/*N*/ 		const SwFlyFrm* pOldExportFlyFrm = pExportInfo->pFlyFrm;
 /*N*/ 		pExportInfo->bFlyFrmFmt = (cType == SWG_FLYFMT);
 /*N*/ 		pExportInfo->pFlyFrm = pExportFlyFrm;
-/*N*/ 	}
-/*N*/ 	OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType );
-/*N*/ 	if( pExportInfo )
-/*N*/ 	{
+                OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType );
 /*N*/ 		pExportInfo->bFlyFrmFmt = bOldExportFlyFrmFmt;
 /*N*/ 		pExportInfo->pFlyFrm = pOldExportFlyFrm;
+
 /*N*/ 	}
+        else
+        {
+/*N*/ 	    OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType );
+        }
 /*N*/ 	CloseRec( cType );
 /*N*/ 	if( cType != SWG_FREEFMT && cType != SWG_SECTFMT )
 /*N*/ 		((SwFmt&)rFmt).SetWritten();
@@ -1103,7 +1103,7 @@ sal_Bool lcl_sw3io_insFtn( const SwTxtNode *pTxtNd )
 
 extern BOOL TstFlyRange( const SwPaM* pPam, const SwIndex& rFlyPos );
 
-/*N*/ void Sw3IoImp::CollectFlyFrms( const SwPaM* pPaM )
+/*N*/ void Sw3IoImp::CollectFlyFrms( const SwPaM* /*pPaM*/ )
 /*N*/ {
 /*N*/ 	if( !pFlyFrms )
 /*N*/ 	{
-- 
1.7.1


--------------020208030004020709090704--


More information about the LibreOffice mailing list