From 8c8478ff36a79e58c29ebdb092ba36ebe5535fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 25 Jan 2011 10:21:18 +0000 Subject: [PATCH] WaE: gcc 4.6.0 various warnings --- .../source/commontools/ConnectionWrapper.cxx | 12 +++--- editeng/source/editeng/editundo.cxx | 2 +- editeng/source/editeng/edtspell.cxx | 1 + editeng/source/editeng/impedit3.cxx | 2 + editeng/source/items/frmitems.cxx | 40 +------------------ editeng/source/misc/svxacorr.cxx | 3 +- editeng/source/outliner/outlvw.cxx | 1 - linguistic/source/convdic.cxx | 8 ---- .../source/style/PagePropertySetContext.cxx | 2 + xmloff/source/xforms/xformsapi.cxx | 1 + 10 files changed, 16 insertions(+), 56 deletions(-) diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index 18252103945b..dc354c24eb9b 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -215,11 +215,11 @@ void OConnectionWrapper::createUniqueId( const ::rtl::OUString& _rURL { // first we create the digest we want to have rtlDigest aDigest = rtl_digest_create( rtl_Digest_AlgorithmSHA1 ); - rtlDigestError aError = rtl_digest_update(aDigest,_rURL.getStr(),_rURL.getLength()*sizeof(sal_Unicode)); + rtl_digest_update(aDigest,_rURL.getStr(),_rURL.getLength()*sizeof(sal_Unicode)); if ( _rUserName.getLength() ) - aError = rtl_digest_update(aDigest,_rUserName.getStr(),_rUserName.getLength()*sizeof(sal_Unicode)); + rtl_digest_update(aDigest,_rUserName.getStr(),_rUserName.getLength()*sizeof(sal_Unicode)); if ( _rPassword.getLength() ) - aError = rtl_digest_update(aDigest,_rPassword.getStr(),_rPassword.getLength()*sizeof(sal_Unicode)); + rtl_digest_update(aDigest,_rPassword.getStr(),_rPassword.getLength()*sizeof(sal_Unicode)); // now we need to sort the properties PropertyValue* pBegin = _rInfo.getArray(); PropertyValue* pEnd = pBegin + _rInfo.getLength(); @@ -246,18 +246,18 @@ void OConnectionWrapper::createUniqueId( const ::rtl::OUString& _rURL const ::rtl::OUString* pSBegin = aSeq.getConstArray(); const ::rtl::OUString* pSEnd = pSBegin + aSeq.getLength(); for(;pSBegin != pSEnd;++pSBegin) - aError = rtl_digest_update(aDigest,pSBegin->getStr(),pSBegin->getLength()*sizeof(sal_Unicode)); + rtl_digest_update(aDigest,pSBegin->getStr(),pSBegin->getLength()*sizeof(sal_Unicode)); } } } if ( sValue.getLength() > 0 ) { // we don't have to convert this into UTF8 because we don't store on a file system - aError = rtl_digest_update(aDigest,sValue.getStr(),sValue.getLength()*sizeof(sal_Unicode)); + rtl_digest_update(aDigest,sValue.getStr(),sValue.getLength()*sizeof(sal_Unicode)); } } - aError = rtl_digest_get(aDigest,_pBuffer,RTL_DIGEST_LENGTH_SHA1); + rtl_digest_get(aDigest,_pBuffer,RTL_DIGEST_LENGTH_SHA1); // we have to destroy the digest rtl_digest_destroy(aDigest); } diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index 8d9096c65c58..b2e2b398f539 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -437,7 +437,7 @@ void EditUndoInsertFeature::Undo() EditSelection aSel( aPaM, aPaM ); // Attribute werden dort implizit vom Dokument korrigiert... aSel.Max().GetIndex()++; - EditPaM aNewPaM = GetImpEditEngine()->ImpDeleteSelection( aSel ); + GetImpEditEngine()->ImpDeleteSelection( aSel ); aSel.Max().GetIndex()--; // Fuer Selektion GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel ); } diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index d1ab8919124b..7b4e5fa3f15a 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -293,6 +293,7 @@ void WrongList::TextInserted( sal_uInt16 nPos, sal_uInt16 nNew, sal_Bool bPosIsS } DBG_ASSERT( !bRefIsValid || ( rWrong.nStart < rWrong.nEnd ), "TextInserted, WrongRange: Start >= End?!" ); + (void)bRefIsValid; } DBG_ASSERT( !DbgIsBuggy(), "InsertWrong: WrongList kaputt!" ); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index b4a4a32745e0..f48531cd1727 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -934,6 +934,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) } DBG_ASSERT( pPortion->GetKind() != PORTIONKIND_HYPHENATOR, "CreateLines: Hyphenator-Portion!" ); DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Leere Portion in CreateLines ?!" ); + (void)bProcessingEmptyLine; if ( pNextFeature && ( pNextFeature->GetStart() == nTmpPos ) ) { sal_uInt16 nWhich = pNextFeature->GetItem()->Which(); @@ -1054,6 +1055,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) else { DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Empty Portion - Extra Space?!" ); + (void)bProcessingEmptyLine; SeekCursor( pNode, nTmpPos+1, aTmpFont ); aTmpFont.SetPhysFont( GetRefDevice() ); ImplInitDigitMode( GetRefDevice(), 0, 0, 0, aTmpFont.GetLanguage() ); diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index d3bfd30fef9e..d8a755f28a87 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1851,7 +1851,6 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const sal_uInt16 nDist = 0; sal_Bool bDistMember = sal_False; nMemberId &= ~CONVERT_TWIPS; - sal_Bool bSerialize = sal_False; switch(nMemberId) { case 0: @@ -1871,22 +1870,18 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } case MID_LEFT_BORDER: - bSerialize = sal_True; // intentionally no break! case LEFT_BORDER: aRetLine = SvxBoxItem::SvxLineToLine(GetLeft(), bConvert); break; case MID_RIGHT_BORDER: - bSerialize = sal_True; // intentionally no break! case RIGHT_BORDER: aRetLine = SvxBoxItem::SvxLineToLine(GetRight(), bConvert); break; case MID_BOTTOM_BORDER: - bSerialize = sal_True; // intentionally no break! case BOTTOM_BORDER: aRetLine = SvxBoxItem::SvxLineToLine(GetBottom(), bConvert); break; case MID_TOP_BORDER: - bSerialize = sal_True; // intentionally no break! case TOP_BORDER: aRetLine = SvxBoxItem::SvxLineToLine(GetTop(), bConvert); break; @@ -1915,21 +1910,7 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const if( bDistMember ) rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100_UNSIGNED(nDist) : nDist); else - { -/* - if ( bSerialize ) - { - ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Any > aSeq(4); - aSeq[0] <<= aRetLine.Color; - aSeq[1] <<= aRetLine.InnerLineWidth; - aSeq[2] <<= aRetLine.OuterLineWidth; - aSeq[3] <<= aRetLine.LineDistance; - rVal <<= aSeq; - } - else -*/ - rVal <<= aRetLine; - } + rVal <<= aRetLine; return true; } @@ -2837,7 +2818,6 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const sal_Int16 nVal=0; sal_Bool bIntMember = sal_False; nMemberId &= ~CONVERT_TWIPS; - sal_Bool bSerialize = sal_False; switch(nMemberId) { case 0: @@ -2861,11 +2841,9 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } case MID_HORIZONTAL: - bSerialize = sal_True; aRetLine = SvxBoxItem::SvxLineToLine( pHori, bConvert); break; case MID_VERTICAL: - bSerialize = sal_True; aRetLine = SvxBoxItem::SvxLineToLine( pVert, bConvert); break; case MID_FLAGS: @@ -2891,21 +2869,7 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } if( !bIntMember ) - { -/* - if ( bSerialize ) - { - ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Any > aSeq(4); - aSeq[0] <<= aRetLine.Color; - aSeq[1] <<= aRetLine.InnerLineWidth; - aSeq[2] <<= aRetLine.OuterLineWidth; - aSeq[3] <<= aRetLine.LineDistance; - rVal <<= aSeq; - } - else - */ - rVal <<= aRetLine; - } + rVal <<= aRetLine; return true; } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 130070b625cc..55f9ee60a591 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -804,7 +804,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, *pWordStt = 0, *pDelim = 0; - BOOL bAtStart = FALSE, bPrevPara = FALSE; + BOOL bAtStart = FALSE; do { --pStr; if( rCC.isLetter( @@ -879,7 +879,6 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } aText = *pPrevPara; - bPrevPara = TRUE; bAtStart = FALSE; pStart = aText.GetBuffer(); pStr = pStart + aText.Len(); diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index ab2d53c349b3..a2d4a2519d77 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -434,7 +434,6 @@ void OutlinerView::ImpPaintDDCursor() Point aStartPointWin, aEndPointWin; Rectangle aOutputArWin = pEditView->GetOutputArea(); - Rectangle aVisAreaRef = pEditView->GetVisArea(); if( bDDChangingDepth ) { diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index f0988a04b2ad..5285dc41ad37 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -111,8 +111,6 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport ) SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xIn ) ); - ULONG nError = sal::static_int_cast< ULONG >(-1); - // prepare ParserInputSource xml::sax::InputSource aParserInput; aParserInput.aInputStream = xIn; @@ -145,18 +143,12 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport ) try { xParser->parseStream( aParserInput ); // implicitly calls ConvDicXMLImport::CreateContext - if (rImport.GetSuccess()) - nError = 0; } catch( xml::sax::SAXParseException& ) { -// if( bEncrypted ) -// nError = ERRCODE_SFX_WRONGPASSWORD; } catch( xml::sax::SAXException& ) { -// if( bEncrypted ) -// nError = ERRCODE_SFX_WRONGPASSWORD; } catch( io::IOException& ) { diff --git a/xmloff/source/style/PagePropertySetContext.cxx b/xmloff/source/style/PagePropertySetContext.cxx index e08b04173de6..a17e124fa2ee 100644 --- a/xmloff/source/style/PagePropertySetContext.cxx +++ b/xmloff/source/style/PagePropertySetContext.cxx @@ -99,6 +99,8 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext( nFil == mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex-1 ), "invalid property map!"); + (void)nPos; + (void)nFil; pContext = new XMLBackgroundImageContext( GetImport(), nPrefix, rLocalName, xAttrList, diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 097789c63cc2..13ffff624258 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.cxx @@ -117,6 +117,7 @@ void lcl_addXFormsModel( // TODO: implement proper error handling DBG_ASSERT( bSuccess, "can't import model" ); + (void)bSuccess; } Reference lcl_findXFormsBindingOrSubmission(