diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-22 10:00:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-22 15:58:55 +0200 |
commit | 9c51e6fb8915bb084d25a58a6eb217f17ecf308b (patch) | |
tree | 8b1f2114cdc5a2a6fd6680092be4db1e5b5c2a46 /embedserv | |
parent | e04e7a7214450fc6dff2571ecda65f7b7ea0d168 (diff) |
pvs-studio: V716 Suspicious type conversion in return statement
https://docs.microsoft.com/en-us/windows/desktop/api/objidl/nf-objidl-irunnableobject-isrunning
has IRunnableObject::IsRunning as returning BOOL unlike ::Run which returns HRESULT
Change-Id: I992d8ba33502eff56b582e1cb9b73f6227c383b8
Reviewed-on: https://gerrit.libreoffice.org/62169
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'embedserv')
-rw-r--r-- | embedserv/source/inprocserv/inprocembobj.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/embedserv/source/inprocserv/inprocembobj.cxx b/embedserv/source/inprocserv/inprocembobj.cxx index cffa2cf03c58..32d27fd37089 100644 --- a/embedserv/source/inprocserv/inprocembobj.cxx +++ b/embedserv/source/inprocserv/inprocembobj.cxx @@ -1283,10 +1283,9 @@ STDMETHODIMP InprocEmbedDocument_Impl::Run( LPBINDCTX pbc ) return E_FAIL; } - BOOL STDMETHODCALLTYPE InprocEmbedDocument_Impl::IsRunning() { - if ( CheckDefHandler() ) + if (CheckDefHandler()) { ComSmart< IRunnableObject > pIRunObj; HRESULT hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, reinterpret_cast<void**>(&pIRunObj) ); @@ -1296,11 +1295,9 @@ BOOL STDMETHODCALLTYPE InprocEmbedDocument_Impl::IsRunning() return pIRunObj->IsRunning(); } - return E_FAIL; - + return FALSE; } - STDMETHODIMP InprocEmbedDocument_Impl::LockRunning( BOOL fLock, BOOL fLastUnlockCloses ) { if ( CheckDefHandler() ) |