From 4e60d1a4c94332745662cc9154e6711c0d0453dc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 30 Sep 2021 12:44:59 +0200 Subject: [PATCH] Extended loplugin:referencecasting/redundantcast (clang-cl): embedserv Change-Id: I342859fbeaffee5d396cbb6ae3e5db41f5cdbb79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122886 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- embedserv/source/embed/ed_idataobj.cxx | 2 +- embedserv/source/embed/servprov.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/embedserv/source/embed/ed_idataobj.cxx b/embedserv/source/embed/ed_idataobj.cxx index 2f0b4d960b16..ca482a421939 100644 --- a/embedserv/source/embed/ed_idataobj.cxx +++ b/embedserv/source/embed/ed_idataobj.cxx @@ -132,7 +132,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::GetData( FORMATETC * pForm pMedium->tymed = TYMED_ISTORAGE; pMedium->pstg = pNewStg; pMedium->pstg->AddRef(); - pMedium->pUnkForRelease = static_cast(pNewStg); + pMedium->pUnkForRelease = pNewStg; return S_OK; } diff --git a/embedserv/source/embed/servprov.cxx b/embedserv/source/embed/servprov.cxx index ebf6c1eb2c28..44eab63dd8b7 100644 --- a/embedserv/source/embed/servprov.cxx +++ b/embedserv/source/embed/servprov.cxx @@ -171,7 +171,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP_(ULONG) EmbedProviderFactory_Impl::Release() COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedProviderFactory_Impl::CreateInstance(IUnknown*, REFIID riid, void** ppv) { - IUnknown* pEmbedDocument = static_cast(static_cast( new EmbedDocument_Impl( m_xFactory, &m_guid ) )); + IUnknown* pEmbedDocument = static_cast( new EmbedDocument_Impl( m_xFactory, &m_guid ) ); return pEmbedDocument->QueryInterface( riid, ppv ); }