reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx | 2 ++ sc/source/filter/xml/xmlwrap.cxx | 1 + sw/source/filter/ww8/wrtw8sty.cxx | 2 +- xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx | 1 + 4 files changed, 5 insertions(+), 1 deletion(-)
New commits: commit 17dc855c6f4a4023393d7006e77a40f89a86fcda Author: Caolán McNamara <[email protected]> AuthorDate: Sun Jan 15 20:21:58 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Jan 16 11:13:02 2023 +0000 cid#1519051 silence Unchecked dynamic_cast and cid#1519050 Unchecked dynamic_cast cid#1519049 Unchecked dynamic_cast cid#1519047 Unchecked dynamic_cast Change-Id: I3feb25cda71c459c549f0e64558935d1030ed309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145541 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index 3e9d2582c171..3a1a353286e5 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -59,6 +59,7 @@ OUString lcl_createAttribute(const xmloff::token::XMLTokenEnum& _eNamespace,cons static void lcl_correctCellAddress(const OUString & _sName, const uno::Reference< xml::sax::XAttributeList > & xAttribs) { comphelper::AttributeList* pList = dynamic_cast<comphelper::AttributeList*>(xAttribs.get()); + assert(pList && "can only succeed"); OUString sCellAddress = pList->getValueByName(_sName); const sal_Int32 nPos = sCellAddress.lastIndexOf('$'); if ( nPos != -1 ) @@ -202,6 +203,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName == "table:table-cell" ) { comphelper::AttributeList* pList = dynamic_cast<comphelper::AttributeList*>(xAttribs.get()); + assert(pList && "can only succeed"); static OUString s_sValue(lcl_createAttribute(XML_NP_OFFICE,XML_VALUE)); pList->RemoveAttribute(s_sValue); } diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 1bcd82311d26..3546bfe5f043 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -661,6 +661,7 @@ bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XComponentC if ( xFilter.is() ) { ScXMLExport* pExport = static_cast<ScXMLExport*>(dynamic_cast<SvXMLExport*>(xFilter.get())); + assert(pExport && "can only succeed"); pExport->SetSharedData(std::move(pSharedData)); // if there are sheets to copy, get the source stream diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx index 74c80afe1a82..6b5c3d6c5bc6 100644 --- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx @@ -59,6 +59,7 @@ uno::Reference< css::xml::crypto::XXMLSecurityContext > SAL_CALL uno::Reference< css::xml::crypto::XSecurityEnvironment > xSecEnv = css::xml::crypto::SecurityEnvironment::create( m_xContext ); SecurityEnvironment_NssImpl* pSecEnv = dynamic_cast<SecurityEnvironment_NssImpl*>(xSecEnv.get()); + assert(pSecEnv && "can only succeed"); pSecEnv->setCertDb(pCertHandle); sal_Int32 n = xSecCtx->addSecurityEnvironment(xSecEnv); commit be3b99f12fa145f26b5ad4821b47d42776dae4c2 Author: Caolán McNamara <[email protected]> AuthorDate: Sun Jan 15 20:17:55 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Jan 16 11:12:53 2023 +0000 cid#1519048 silence Unchecked return value Change-Id: Ia4763684d84b671e4fb2523b6d5bc222fb5e71e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145540 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 21d11894f2d5..8f127c918781 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -324,7 +324,7 @@ void MSWordStyles::BuildStylesTable() static OUString StripWWSuffix(const OUString& s) { OUString ret = s; - ret.endsWith(" (WW)", &ret); + (void)ret.endsWith(" (WW)", &ret); return ret; }
