diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-10 12:49:13 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-10 12:49:13 +0100 |
commit | c1ed15532ca066c67d05432c3e2f99c7feccbaf9 (patch) | |
tree | 4a5cee7b50b799f1991cf88a7ec569f5d6cfb4c5 | |
parent | reduce binfilter ByteString to used parts (diff) | |
download | binfilter-c1ed15532ca066c67d05432c3e2f99c7feccbaf9.tar.gz binfilter-c1ed15532ca066c67d05432c3e2f99c7feccbaf9.zip |
WaE: msvc potentially used uninitialized
-rw-r--r-- | binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx | 30 | ||||
-rw-r--r-- | binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx | 12 | ||||
-rw-r--r-- | binfilter/inc/bf_sw/iodetect.hxx | 2 |
3 files changed, 22 insertions, 22 deletions
diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx index 4cd3f56e4..b8e0722fd 100644 --- a/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx +++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx @@ -1180,7 +1180,7 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ pType = lcl_sw3io_InSetExpFieldType( rIo ); /*N*/ else /*N*/ { -/*N*/ USHORT nPoolId; +/*N*/ USHORT nPoolId=0; /*N*/ *rIo.pStrm >> nPoolId; /*N*/ /*N*/ // fix #26064#: Namen der 3 Label-Numernkreise: Hier wird die @@ -1196,8 +1196,8 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ } /*N*/ } /*N*/ -/*N*/ UINT16 nSeqNo; -/*N*/ BYTE cFlags; +/*N*/ UINT16 nSeqNo=0; +/*N*/ BYTE cFlags=0; /*N*/ String aFormula, aExpand, aPrompt; /*N*/ *rIo.pStrm >> cFlags; /*N*/ rIo.InString( *rIo.pStrm, aFormula ); @@ -1256,8 +1256,8 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ { /*N*/ pType = 0; /*N*/ -/*N*/ BYTE cFlags; -/*N*/ UINT16 nPoolId, nSeqNo=0, nSeqVal=0; +/*N*/ BYTE cFlags=0; +/*N*/ UINT16 nPoolId=0, nSeqNo=0, nSeqVal=0; /*N*/ String aFormula, aPrompt, aExpand; /*N*/ *rIo.pStrm >> cFlags >> nPoolId; /*N*/ rIo.InString( *rIo.pStrm, aFormula ); @@ -1314,9 +1314,9 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ SwField* lcl_sw3io_InHiddenParaField( Sw3IoImp& rIo, SwFieldType* pType, /*N*/ USHORT, UINT32& ) /*N*/ { -/*N*/ BYTE bHidden; -/*N*/ String aCond; +/*N*/ BYTE bHidden=FALSE; /*N*/ *rIo.pStrm >> bHidden; +/*N*/ String aCond; /*N*/ rIo.InString( *rIo.pStrm, aCond ); /*N*/ SwHiddenParaField* pFld = new SwHiddenParaField( (SwHiddenParaFieldType*)pType, aCond ); /*N*/ pFld->SetHidden( (BOOL) bHidden ); @@ -1326,7 +1326,7 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ SwField* lcl_sw3io_InDocInfoField40( Sw3IoImp& rIo, SwFieldType* pType, /*N*/ USHORT nSubType, UINT32& rFmt ) /*N*/ { -/*N*/ UINT16 nSub; +/*N*/ UINT16 nSub=0; /*N*/ *rIo.pStrm >> nSub; /*N*/ nSubType |= nSub; /*N*/ @@ -1338,12 +1338,12 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ SwField* lcl_sw3io_InDocInfoField( Sw3IoImp& rIo, SwFieldType* pType, /*N*/ USHORT nSubType, UINT32& rFmt ) /*N*/ { -/*N*/ BYTE cFlags; /*N*/ SwDocInfoField *pFld = new SwDocInfoField( (SwDocInfoFieldType*)pType, /*N*/ nSubType, rFmt ); /*N*/ -/*N*/ String aContent; +/*N*/ BYTE cFlags=FALSE; /*N*/ *rIo.pStrm >> cFlags; +/*N*/ String aContent; /*N*/ rIo.InString( *rIo.pStrm, aContent ); /*N*/ pFld->SetExpansion(aContent); /*N*/ if( cFlags & 0x01 ) @@ -1415,9 +1415,9 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ SwField* lcl_sw3io_InDBSetNumberField( Sw3IoImp& rIo, SwFieldType* pType, /*N*/ USHORT, UINT32& ) /*N*/ { -/*N*/ String aDBName; -/*N*/ INT32 n; +/*N*/ INT32 n=0; /*N*/ *rIo.pStrm >> n; +/*N*/ String aDBName; /*N*/ if( rIo.IsVersion( SWG_MULTIDB, SWG_EXPORT31, SWG_DESKTOP40 ) ) /*N*/ { /*N*/ USHORT nPoolId; @@ -1436,8 +1436,8 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ USHORT, UINT32& ) /*N*/ { /*N*/ String aData; -/*N*/ UINT16 nSubType; /*N*/ rIo.InString( *rIo.pStrm, aData ); +/*N*/ UINT16 nSubType=0; /*N*/ *rIo.pStrm >> nSubType; /*N*/ SwExtUserField* pFld = new SwExtUserField( (SwExtUserFieldType*)pType, nSubType ); /*N*/ ((SwExtUserFieldType*)pType)->SetData( aData ); @@ -1466,8 +1466,8 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ SwField* lcl_sw3io_InRefPageSetField( Sw3IoImp& rIo, SwFieldType* pType, /*N*/ USHORT, UINT32& ) /*N*/ { - INT16 nOffset; - BYTE cIsOn; + INT16 nOffset=0; + BYTE cIsOn=FALSE; *rIo.pStrm >> nOffset >> cIsOn; return new SwRefPageSetField( (SwRefPageSetFieldType*)pType, nOffset, cIsOn!=0 ); /*N*/ } diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx index 00f812862..74321cbe3 100644 --- a/binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx +++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx @@ -379,7 +379,7 @@ namespace binfilter { /*N*/ SfxPoolItem* SwFmtFtn::Create( SvStream& rStrm, USHORT nIVer ) const /*N*/ { -/*N*/ UINT16 nNumber1; +/*N*/ UINT16 nNumber1 = 0; /*N*/ rStrm >> nNumber1; /*N*/ String aNumber1 = rStrm.ReadUniOrByteString( rStrm.GetStreamCharSet() ); /*N*/ @@ -406,7 +406,7 @@ namespace binfilter { /*N*/ } /*N*/ /*N*/ // die Seq-Nummer einlesen - fuer die Querverweise auf Fussnoten -/*N*/ USHORT nSeqNo; +/*N*/ USHORT nSeqNo = 0; /*N*/ BOOL bEndNote1 = FALSE; /*N*/ if( 1 <= nIVer ) /*N*/ { @@ -414,7 +414,7 @@ namespace binfilter { /*N*/ } /*N*/ if( 2 <= nIVer ) /*N*/ { -/*N*/ BYTE nFlags; +/*N*/ BYTE nFlags = 0; /*N*/ rStrm >> nFlags; /*N*/ bEndNote1 = (nFlags & 0x01) != 0; /*N*/ } @@ -463,8 +463,8 @@ namespace binfilter { /*N*/ SfxPoolItem* SwTOXMark::Create( SvStream& rStrm, USHORT nIVer ) const /*N*/ { -/*N*/ BYTE cType; -/*N*/ UINT16 nLevel1, nStrIdx = IDX_NO_VALUE; +/*N*/ BYTE cType = 0; +/*N*/ UINT16 nLevel1 = 0, nStrIdx = IDX_NO_VALUE; /*N*/ String aTypeName, aAltText1, aPrimKey, aSecKey; /*N*/ Sw3IoImp* pIo = Sw3IoImp::GetCurrentIo(); /*N*/ rStrm >> cType @@ -566,7 +566,7 @@ SfxPoolItem* SwFmtRuby::Create(SvStream & rStrm, USHORT /*nVer*/) const String sRubyTxt1; SwFmtRuby* pRet = new SwFmtRuby( sRubyTxt1 ); - BOOL bVal; + BOOL bVal = FALSE; rStrm >> bVal; return pRet; diff --git a/binfilter/inc/bf_sw/iodetect.hxx b/binfilter/inc/bf_sw/iodetect.hxx index b939acdd9..e4d14dd76 100644 --- a/binfilter/inc/bf_sw/iodetect.hxx +++ b/binfilter/inc/bf_sw/iodetect.hxx @@ -451,7 +451,7 @@ const SfxFilter* SwIoSystem::GetFileFilter( const String& rFileName, \ /* nie erkannt und es wird auch der ASCII-Filter returnt. */ \ /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ \ { \ - const SfxFilter* pLclFilter; \ + const SfxFilter* pLclFilter=NULL; \ const sal_Char* pNm; \ for( USHORT n = 0; n < MAXFILTER; ++n ) \ if( 0 != ( pNm = aReaderWriter[n].IsReader(aBuffer, nBytesRead)) && \ |