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.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2025-08-18 12:40:58 +02:00
parent 918c409e63
commit 7841de4bf7
19 changed files with 10 additions and 24 deletions
-1
View File
@@ -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;
-1
View File
@@ -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;
}
+2 -2
View File
@@ -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 &&
+1 -1
View File
@@ -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?
{
+1 -1
View File
@@ -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 );
+1 -1
View File
@@ -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();
}
+2 -2
View File
@@ -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 );
@@ -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();
-1
View File
@@ -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;
@@ -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 > >(
-1
View File
@@ -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);
-1
View File
@@ -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
{
-1
View File
@@ -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(
+1 -1
View File
@@ -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)
-1
View File
@@ -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
-1
View File
@@ -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);
}
@@ -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();
@@ -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 );
}
+1 -1
View File
@@ -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 );
}