Kaydet (Commit) 6768a9b6 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:redundantcast check for c-style casts to void

Change-Id: Ic8b99f590436f94825e471bc61411c69fd768862
Reviewed-on: https://gerrit.libreoffice.org/36208Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ad16351d
......@@ -307,7 +307,8 @@ bool RedundantCast::VisitCStyleCastExpr(CStyleCastExpr const * expr) {
return true;
}
bool bBuiltinType = t1->isSpecificBuiltinType(BuiltinType::Bool) || t1->isSpecificBuiltinType(BuiltinType::Double)
|| t1->isSpecificBuiltinType(BuiltinType::Float);
|| t1->isSpecificBuiltinType(BuiltinType::Float)
|| t1->isSpecificBuiltinType(BuiltinType::Void);
if ((bBuiltinType || loplugin::TypeCheck(t1).Typedef()) && t1 == t2)
{
// Ignore FD_ISSET expanding to "...(SOCKET)(fd)..." in some Microsoft
......
......@@ -64,7 +64,7 @@ AstScope* AstStack::nextToTop()
return nullptr;
tmp = top(); // Save top
(void) pop(); // Pop it
pop(); // Pop it
retval = top(); // Get next one down
(void) push(tmp); // Push top back
return retval; // Return next one down
......
......@@ -410,7 +410,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
for (SCSIZE i=1; i<nCount && rListData; i++)
{
(void)GetString(nCol, nRow, aStr);
GetString(nCol, nRow, aStr);
if (!rListData->GetSubIndex(aStr, rListIndex, bMatchCase))
rListData = nullptr;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
......
......@@ -71,10 +71,10 @@ void NodeTest::testTdf47813()
#undef MATRIX
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
SmFormat aFmt;
(void)pNodeA->Arrange(*pOutputDevice, aFmt);
(void)pNodeC->Arrange(*pOutputDevice, aFmt);
(void)pNodeL->Arrange(*pOutputDevice, aFmt);
(void)pNodeR->Arrange(*pOutputDevice, aFmt);
pNodeA->Arrange(*pOutputDevice, aFmt);
pNodeC->Arrange(*pOutputDevice, aFmt);
pNodeL->Arrange(*pOutputDevice, aFmt);
pNodeR->Arrange(*pOutputDevice, aFmt);
long nWidthA = pNodeA->GetRect().GetWidth();
long nWidthC = pNodeC->GetRect().GetWidth();
long nWidthL = pNodeL->GetRect().GetWidth();
......
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