sd/source/filter/eppt/eppt.cxx | 1 - sd/source/ui/unoidl/unopage.cxx | 1 - sw/source/core/crsr/trvlreg.cxx | 4 ++-- sw/source/core/crsr/trvltbl.cxx | 2 +- sw/source/core/doc/doc.cxx | 2 +- sw/source/core/doc/doctxm.cxx | 2 +- sw/source/core/text/txtfrm.cxx | 4 ++-- sw/source/filter/ww8/docxattributeoutput.cxx | 4 ---- sw/source/filter/ww8/docxtableexport.cxx | 1 - testtools/source/bridgetest/bridgetest.cxx | 1 - toolkit/source/awt/vclxtoolkit.cxx | 1 - ucb/source/ucp/file/filtask.cxx | 1 - unotest/source/cpp/officeconnection.cxx | 1 - unoxml/source/dom/node.cxx | 2 +- vcl/unx/generic/app/saldisp.cxx | 1 - xmloff/source/chart/ColorPropertySet.cxx | 1 - xmloff/source/style/XMLFontAutoStylePool.cxx | 1 - xmloff/source/transform/ChartOASISTContext.cxx | 2 +- xmloff/source/transform/StyleOOoTContext.cxx | 2 +- 19 files changed, 10 insertions(+), 24 deletions(-)
New commits: commit 7841de4bf726fb1b8785cdbbe48c0a7b6b4d3b5d Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Aug 17 12:10:33 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Aug 18 12:40:58 2025 +0200 drop outdated coverity directives Change-Id: Icbe3f0bb9433cfcf08efd28bc4eab1ba82efab74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189850 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 0e9ff8bb5f5a..6c88c2b4f499 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -507,7 +507,6 @@ void PPTWriter::ImplCreateDocumentSummaryInformation() 'A',0,'1',0,'E',0,'F',0,'-',0,'0',0,'0',0,'6',0,'0',0,'9',0, '7',0,'D',0,'A',0,'5',0,'6',0,'8',0,'9',0,'}',0 }; - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence uno::Sequence<sal_Int8> aGuidSeq(aGuid, 0x52); SvMemoryStream aHyperBlob; diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 5acf4dfb77c3..adc0df7ad991 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1495,7 +1495,6 @@ Reference< drawing::XShape > SdGenericDrawPage::CreateShape(SdrObject *pObj) co case PresObjKind::DateTime: aShapeType += "DateTimeShape"; break; - // coverity[dead_error_begin] - following conditions exist to avoid compiler warning case PresObjKind::NONE: break; } diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 1bcc4e81ea33..9ca1a7689b45 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -60,7 +60,7 @@ bool GotoPrevRegion( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosRegi continue; } - assert( pNd ); // coverity, should never be nullptr + assert(pNd && "should never be nullptr"); { if( pNd->GetSection().IsHiddenFlag() || ( !bInReadOnly && @@ -134,7 +134,7 @@ bool GotoNextRegion( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosRegi continue; } - assert( pNd ); // coverity, should never be nullptr + assert(pNd && "should never be nullptr"); { if( pNd->GetSection().IsHiddenFlag() || ( !bInReadOnly && diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index e6a4eb4af339..6a9fb3bd2042 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -588,7 +588,7 @@ bool GotoNextTable( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosTable continue; } - assert( pTableNd ); // coverity, should never be nullptr + assert(pTableNd && "should never be nullptr"); if( &fnPosTable == &fnMoveForward ) // at the beginning? { diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 01c064af5b25..271cc11980ec 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1916,7 +1916,7 @@ bool SwDoc::RemoveInvisibleContent() aPam.SetMark(); aPam.GetPoint()->Assign( *pSectNd->EndOfSectionNode() ); pCNd = SwNodes::GoPrevious( aPam.GetPoint() ); - assert(pCNd); // keep coverity happy + assert(pCNd && "won't be null"); aPam.GetPoint()->SetContent( pCNd->Len() ); getIDocumentContentOperations().DeleteRange( aPam ); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index cc519c0fa9a3..36f03f1a792d 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -945,7 +945,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, // determine page description of content before table-of-content SwNodeIndex aIdx( *pSectNd ); SwContentNode* pTmp = SwNodes::GoPrevious( &aIdx ); - assert(pTmp); // make coverity happy + assert(pTmp && "won't be null"); pDefaultPageDesc = pTmp->FindPageDesc(); } diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index d19f8f5a4c38..b44414238863 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -3874,7 +3874,7 @@ void SwTextFrame::CalcHeightOfLastLine( const bool _bUseFont ) aFont.SetFntChg( true ); aFont.ChgPhysFnt( pVsh, *pOut ); mnHeightOfLastLine = aFont.GetHeight( pVsh, *pOut ); - assert(pLastFont && "coverity[var_deref_model] - pLastFont should be set in SwSubFont::ChgFnt"); + assert(pLastFont && "pLastFont should be set in SwSubFont::ChgFnt"); pLastFont->Unlock(); pLastFont = pOldFont; pLastFont->SetDevFont( pVsh, *pOut ); @@ -3885,7 +3885,7 @@ void SwTextFrame::CalcHeightOfLastLine( const bool _bUseFont ) aFont.SetFntChg( true ); aFont.ChgPhysFnt( pVsh, *pOut ); mnHeightOfLastLine = aFont.GetHeight( pVsh, *pOut ); - assert(pLastFont && "coverity[var_deref_model] - pLastFont should be set in SwSubFont::ChgFnt"); + assert(pLastFont && "pLastFont should be set in SwSubFont::ChgFnt"); pLastFont->Unlock(); pLastFont = nullptr; pOut->SetFont( aOldFont ); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 5b095e163602..5ffe409746a6 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1504,7 +1504,6 @@ void DocxAttributeOutput::InitCollectedParagraphProperties() // postpone the output so that we can later [in EndParagraphProperties()] // prepend the properties before the run - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence m_pSerializer->mark(Tag_InitCollectedParagraphProperties, comphelper::containerToSequence(aOrder)); } @@ -3391,7 +3390,6 @@ void DocxAttributeOutput::InitCollectedRunProperties() // postpone the output so that we can later [in EndParagraphProperties()] // prepend the properties before the run - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence m_pSerializer->mark(Tag_InitCollectedRunProperties, comphelper::containerToSequence(aOrder)); } @@ -7164,7 +7162,6 @@ void DocxAttributeOutput::StartSection() // postpone the output so that we can later [in EndParagraphProperties()] // prepend the properties before the run - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence m_pSerializer->mark(Tag_StartSection, comphelper::containerToSequence(aOrder)); m_bHadSectPr = true; } @@ -7632,7 +7629,6 @@ bool DocxAttributeOutput::EmbedFontStyle(std::u16string_view name, int tag, Font } if( readSize == 0 ) break; - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence xOutStream->writeBytes( uno::Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( buffer ), readSize )); } xOutStream->closeOutput(); diff --git a/sw/source/filter/ww8/docxtableexport.cxx b/sw/source/filter/ww8/docxtableexport.cxx index 3c47ce94dfed..30124265e7c9 100644 --- a/sw/source/filter/ww8/docxtableexport.cxx +++ b/sw/source/filter/ww8/docxtableexport.cxx @@ -181,7 +181,6 @@ void DocxAttributeOutput::TableDefinition( // postpone the output so that we can later [] // prepend the properties before the run - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence m_pSerializer->mark(Tag_TableDefinition, comphelper::containerToSequence(aOrder)); tools::Long nPageSize = 0; diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index eedf85f13ded..462e86e8d3f1 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -773,7 +773,6 @@ static bool performTest( for (int j = 0; j != 3; ++j) { Sequence< sal_Int32 > _arSeqLong[3]; for (int i = 0; i != 3; ++i) { - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence _arSeqLong[i] = Sequence< sal_Int32 >(_arLong, 3); } _arSeqLong2[j] = Sequence< Sequence< sal_Int32 > >( diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index e22bffadb9b2..576bedde5ed3 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1638,7 +1638,6 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( rtl::Reference<VCLXWindow>* ppNewCom rtl_getGlobalProcessId( reinterpret_cast<sal_uInt8*>(processID) ); - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence css::uno::Sequence<sal_Int8> processIdSeq(processID, 16); css::uno::Any anyHandle = xSystemDepParent->getWindowHandle(processIdSeq, SYSTEM_DEPENDENT_TYPE); diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index a088e9b63017..69553280c510 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -645,7 +645,6 @@ void TaskManager::page( sal_Int32 CommandId, err = aFile.read( static_cast<void*>(BFF),bfz,nrc ); if( err == osl::FileBase::E_None ) { - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence uno::Sequence< sal_Int8 > seq( BFF, static_cast<sal_uInt32>(nrc) ); try { diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx index fbf4df058439..42647c5223d6 100644 --- a/unotest/source/cpp/officeconnection.cxx +++ b/unotest/source/cpp/officeconnection.cxx @@ -74,7 +74,6 @@ void OfficeConnection::setUp() { { envs = &argEnv.pData; } - // coverity[callee_ptr_arith] - arith is fine CPPUNIT_ASSERT_EQUAL( osl_Process_E_None, osl_executeProcess( diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index a642be29629d..d36f107f20fd 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -864,7 +864,7 @@ namespace DOM if (pNew->next != nullptr) pNew->next->prev = pNew; pNew->parent = pOld->parent; - assert(pNew->parent && "coverity[var_deref_op] pNew->parent cannot be NULL here"); + assert(pNew->parent && "pNew->parent cannot be NULL here"); if(pNew->parent->children == pOld) pNew->parent->children = pNew; if(pNew->parent->last == pOld) diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 9b9b57444a7f..2945c9cd7cf0 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -1862,7 +1862,6 @@ void SalX11Display::Yield() XNextEvent( pDisp_, &aEvent ); - // coverity[overrun-buffer-val : FALSE] - coverity has problems with uno::Sequence Dispatch( &aEvent ); #ifdef DBG_UTIL diff --git a/xmloff/source/chart/ColorPropertySet.cxx b/xmloff/source/chart/ColorPropertySet.cxx index b7a4b45dd893..f40f652153a3 100644 --- a/xmloff/source/chart/ColorPropertySet.cxx +++ b/xmloff/source/chart/ColorPropertySet.cxx @@ -134,7 +134,6 @@ PropertyState SAL_CALL ColorPropertySet::getPropertyState( const OUString& /* Pr Sequence< PropertyState > SAL_CALL ColorPropertySet::getPropertyStates( const Sequence< OUString >& /* aPropertyName */ ) { PropertyState aState = PropertyState_DIRECT_VALUE; - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence return Sequence<PropertyState>(&aState, 1); } diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index 138ac56465ff..f085f867b4ba 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -647,7 +647,6 @@ OUString SvXMLExport::embedFontFile(OUString const& fileUrl, OUString const& rFa } if( readSize == 0 ) break; - // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence outputStream->writeBytes(uno::Sequence<sal_Int8>(buffer, readSize)); } outputStream->closeOutput(); diff --git a/xmloff/source/transform/ChartOASISTContext.cxx b/xmloff/source/transform/ChartOASISTContext.cxx index 481b6c9722d8..d942664f4cd0 100644 --- a/xmloff/source/transform/ChartOASISTContext.cxx +++ b/xmloff/source/transform/ChartOASISTContext.cxx @@ -121,7 +121,7 @@ void XMLChartOASISTransformerContext::StartElement( OUString aAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_CHART, GetXMLToken( XML_ADD_IN_NAME ) ) ); - assert(pMutableAttrList && "coverity[var_deref_model] - pMutableAttrList should be assigned in a superset of the enclosing if condition entry logic"); + assert(pMutableAttrList && "pMutableAttrList should be assigned in a superset of the enclosing if condition entry logic"); pMutableAttrList->AddAttribute( aAttrQName, aAddInName ); } diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 490baa5b4905..16d8ea482add 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -968,7 +968,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( aProtectAttrValue += rSize; } - assert(pProtectContext && "coverity[var_deref_model] - pProtectContext should be assigned in a superset of the enclosing if condition entry logic"); + assert(pProtectContext && "pProtectContext should be assigned in a superset of the enclosing if condition entry logic"); pProtectContext->AddAttribute( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken( XML_PROTECT ) ), aProtectAttrValue ); }