Kaydet (Commit) 6a12a9e9 authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#120703 PVS: V530 The return value of function is required to be utilized

Change-Id: Ifc170a45e25b3fd5b7f561cc50afb6452bb359bd
Reviewed-on: https://gerrit.libreoffice.org/62420
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 2272b7e8
......@@ -441,7 +441,7 @@ void SbiProcDef::Match( std::unique_ptr<SbiProcDef> pOld )
pIn = pOld->pIn;
std::unique_ptr<SbiSymDef> tmp(this);
std::swap(pIn->m_Data[nPos], tmp);
tmp.release();
(void)tmp.release();
}
}
......
......@@ -127,7 +127,7 @@ void SbxBase::RemoveFactory( SbxFactory const * pFac )
{
std::unique_ptr<SbxFactory> tmp(std::move(*it));
r.m_Factories.erase( it );
tmp.release();
(void)tmp.release();
break;
}
}
......
......@@ -220,9 +220,9 @@ namespace desktop
}
}
freopen("CON", "r", stdin);
freopen("CON", "w", stdout);
freopen("CON", "w", stderr);
(void)freopen("CON", "r", stdin);
(void)freopen("CON", "w", stdout);
(void)freopen("CON", "w", stderr);
std::ios::sync_with_stdio(true);
......
......@@ -2100,7 +2100,7 @@ void EditDoc::Release(sal_Int32 nPos)
SAL_WARN( "editeng", "EditDoc::Release - out of bounds pos " << nPos);
return;
}
maContents[nPos].release();
(void)maContents[nPos].release();
maContents.erase(maContents.begin() + nPos);
}
......
......@@ -913,8 +913,8 @@ void OleComponent::InitEmbeddedCopyOfLink( OleComponent const * pOleLinkComponen
if ( SUCCEEDED( hr ) && aMonType == MKSYS_FILEMONIKER )
{
ComSmart< IMalloc > pMalloc;
CoGetMalloc( 1, &pMalloc ); // if fails there will be a memory leak
OSL_ENSURE( pMalloc, "CoGetMalloc() failed!" );
hr = CoGetMalloc( 1, &pMalloc ); // if fails there will be a memory leak
OSL_ENSURE(SUCCEEDED(hr) && pMalloc, "CoGetMalloc() failed!");
LPOLESTR pOleStr = nullptr;
hr = pOleLink->GetSourceDisplayName( &pOleStr );
......
......@@ -490,7 +490,7 @@ static void load_msvcr(OUString const & jvm_dll, OUStringLiteral msvcr)
if (slash == -1)
return;
LoadLibraryW(
(void)LoadLibraryW(
o3tl::toW(OUString(jvm_dll.copy(0, slash+1) + msvcr).getStr()));
}
......
......@@ -399,7 +399,7 @@ extern "C" __declspec(dllexport) UINT __stdcall UnpackMSUForInstall(MSIHANDLE hI
CheckWin32Error("MsiSetPropertyW", MsiSetPropertyW(hInstall, L"inst_msu", sBinary.c_str()));
// Don't delete the file: it will be done by following actions (inst_msu or cleanup_msu)
aDeleteFileGuard.release();
(void)aDeleteFileGuard.release();
return ERROR_SUCCESS;
}
catch (std::exception& e)
......
......@@ -621,8 +621,7 @@ void OnDrawItem(HWND /*hwnd*/, LPDRAWITEMSTRUCT lpdis)
hModule = GetModuleHandleW( pModuleName );
if ( hModule == nullptr )
{
LoadLibraryW( pModuleName );
hModule = GetModuleHandleW( pModuleName );
hModule = LoadLibraryW(pModuleName);
}
}
......
......@@ -37,7 +37,12 @@ public:
SwParaPortion *GetPara() { return pLine.get(); }
const SwParaPortion *GetPara() const { return pLine.get(); }
void SetPara( SwParaPortion *pNew, bool bDelete ) { if (!bDelete) pLine.release(); pLine.reset( pNew ); }
void SetPara(SwParaPortion* pNew, bool bDelete)
{
if (!bDelete)
(void)pLine.release();
pLine.reset(pNew);
}
};
class SwTextLineAccess : public SwCacheAccess
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment