cui/source/options/optlingu.cxx | 2 +- sc/source/filter/xml/xmlcondformat.cxx | 4 ++-- sc/source/ui/docshell/dataprovider.cxx | 4 ++-- sfx2/source/appl/appmisc.cxx | 2 +- sw/source/core/draw/dcontact.cxx | 4 ++-- sw/source/core/layout/anchoreddrawobject.cxx | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit a7bd6830e26d798068970684754fa23894d9f7c2 Author: Caolán McNamara <[email protected]> Date: Thu Dec 15 21:27:42 2016 +0000 coverity#1397206 Resource leak Change-Id: I497388a353425811ff18d9b1937ca536b562ddfc diff --git a/sc/source/ui/docshell/dataprovider.cxx b/sc/source/ui/docshell/dataprovider.cxx index 7df702c..76f3776 100644 --- a/sc/source/ui/docshell/dataprovider.cxx +++ b/sc/source/ui/docshell/dataprovider.cxx @@ -106,10 +106,10 @@ void CSVFetchThread::EndThread() void CSVFetchThread::execute() { - LinesType* pLines = new LinesType(10); + LinesType aLines(10); // Read & store new lines from stream. - for (Line & rLine : *pLines) + for (Line & rLine : aLines) { rLine.maCells.clear(); mpStream->ReadLine(rLine.maLine); commit 932719a8c5e53eabe7586a7ac845ff2aaa11e46a Author: Caolán McNamara <[email protected]> Date: Thu Dec 15 21:25:52 2016 +0000 coverity#1397203 Dereference after null check Change-Id: Icd03b10226025bae28574e695ed6416f70d0f54a diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index c806f3f..1c95425 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -115,7 +115,7 @@ SwPosNotify::~SwPosNotify() } } // tdf#101464 notify SwAccessibleMap about new drawing object position - if (mpOldPageFrame->getRootFrame()->IsAnyShellAccessible()) + if (mpOldPageFrame && mpOldPageFrame->getRootFrame()->IsAnyShellAccessible()) { mpOldPageFrame->getRootFrame()->GetCurrShell()->Imp()->MoveAccessible( nullptr, mpAnchoredDrawObj->GetDrawObj(), maOldObjRect); commit 7a9d5485a815af26c63790e3165477c68e164117 Author: Caolán McNamara <[email protected]> Date: Thu Dec 15 21:21:38 2016 +0000 coverity#1397207 Dereference before null check Change-Id: I2578d59e98a2b1b040d9284b0ad0f68fd331d0df diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 73d2b38..0ef9fca 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -411,9 +411,9 @@ const SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( const SdrObject* _pSdr const SwAnchoredObject* pRetAnchoredObj = nullptr; - if ( _pSdrObj && dynamic_cast<const SwVirtFlyDrawObj*>( _pSdrObj) != nullptr ) + if (const SwVirtFlyDrawObj* pFlyDrawObj = dynamic_cast<const SwVirtFlyDrawObj*>(_pSdrObj)) { - pRetAnchoredObj = static_cast<const SwVirtFlyDrawObj*>(_pSdrObj)->GetFlyFrame(); + pRetAnchoredObj = pFlyDrawObj->GetFlyFrame(); } return pRetAnchoredObj; commit f74cad45681cc0ea5706a112a0e17f14a3197e39 Author: Caolán McNamara <[email protected]> Date: Thu Dec 15 21:17:58 2016 +0000 coverity#1397204 Dereference null return value Change-Id: Ief4b455b316b55ebf012a8650c96da037df0135c diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index a982606..cd32265 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -222,7 +222,7 @@ static void lcl_SetCheckButton( SvTreeListEntry* pEntry, bool bCheck ) SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SvLBoxItemType::Button)); DBG_ASSERT(pItem,"SetCheckButton:Item not found"); - if (pItem->GetType() == SvLBoxItemType::Button) + if (pItem && pItem->GetType() == SvLBoxItemType::Button) { if (bCheck) pItem->SetStateChecked(); commit eb0e2dabde9d96892929f6902d8d10d722b83c3e Author: Caolán McNamara <[email protected]> Date: Thu Dec 15 21:15:29 2016 +0000 coverity#1397200 Unchecked return value and coverity#1397201 Unchecked return value coverity#1397202 Unchecked return value Change-Id: I73cc6e3b08e6a44b27be2093ba568d46ebe0659a diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx index 6479f1b..d34c27c 100644 --- a/sc/source/filter/xml/xmlcondformat.cxx +++ b/sc/source/filter/xml/xmlcondformat.cxx @@ -266,7 +266,7 @@ ScXMLDataBarFormatContext::ScXMLDataBarFormatContext( ScXMLImport& rImport, sal_ if(!sShowValue.isEmpty()) { bool bShowValue = true; - sax::Converter::convertBool( bShowValue, sShowValue ); + (void)sax::Converter::convertBool( bShowValue, sShowValue ); mpFormatData->mbOnlyBar = !bShowValue; } @@ -366,7 +366,7 @@ ScXMLIconSetFormatContext::ScXMLIconSetFormatContext(ScXMLImport& rImport, sal_u if(!sShowValue.isEmpty()) { bool bShowValue = true; - sax::Converter::convertBool( bShowValue, sShowValue ); + (void)sax::Converter::convertBool( bShowValue, sShowValue ); pIconSetFormatData->mbShowValue = !bShowValue; } diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index bf6a9a1..ea712f6 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -218,7 +218,7 @@ BitmapEx SfxApplication::GetApplicationLogo(long nWidth) { BitmapEx aBitmap; SfxApplication::loadBrandSvg("flat_logo", aBitmap, nWidth); - Application::LoadBrandBitmap ("about", aBitmap); + (void)Application::LoadBrandBitmap ("about", aBitmap); return aBitmap; }
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
