On Fri, 2015-01-30 at 10:47 -0800, scan-admin@coverity.com wrote:
________________________________________________________________________________________________________
*** CID 1267636: Logically dead code (DEADCODE)
/sw/source/core/doc/textboxhelper.cxx: 242 in SwTextBoxHelper::getByIndex(SdrPage *, int,
std::set<const SwFrmFmt *, std::less<const SwFrmFmt *>, std::allocator<const SwFrmFmt *>> &)()
236 pRet = pPage->GetObj(i);
237 break;
238 }
239 ++nCount;
240 }
241 assert(pRet);
CID 1267636: Logically dead code (DEADCODE)
Execution cannot reach this statement: "<temporary>.Any();".
242 return pRet ? uno::makeAny(uno::Reference<drawing::XShape>(pRet->getUnoShape(),
uno::UNO_QUERY)) : uno::Any();
243 }
244
245 sal_Int32 SwTextBoxHelper::getOrdNum(const SdrObject* pObject, std::set<const SwFrmFmt*>&
rTextBoxes)
246 {
247 if (const SdrPage* pPage = pObject->GetPage())
So, if we show coverity the asserts it removes a pile of warnings, but
introduces another pile of deadcode given the way we have stacks of
defensive "this shouldn't happen, but if it does" code :-) We either
ifdef off NDEBUG, just go back to hiding asserts from coverity, or
bravely claim that all our assert conditions never happen in release
mode.
C.
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.