New Defects reported by Coverity Scan for LibreOffice

Caolán McNamara caolanm at redhat.com
Mon Jan 23 10:10:44 UTC 2017


On Mon, 2017-01-23 at 10:03 +0100, Stephan Bergmann wrote:
> This appears to be irrespective of any (dynamic) exception 
> specifications, so is unlikely to go away with the ongoing work for 
> <https://lists.freedesktop.org/archives/libreoffice/2017-January/0766
> 65.html> 
> "Dynamic Exception Specifications".

Yeah, I upgraded out coverity to the latest 8.7.0, hence the new
exception warnings on exceptions possibly thrown from dtors.

Note too that the checks just examine what methods could possibly be
called on any given code path through the code, not just the one used
in the dtor so

foo::~foo()
{
    thing(false);
}

void thing(bool bar)
{
    if (bar)
       throw something
}

gets a warning.

Presumably adding noexcept(false) to things will generally have to wait
until the dynamic exception specification stuff is in place cause the
top of the various hierarchies need the loosest throw specs for
inherited things to loosen theirs to noexcept(false)

C.


More information about the LibreOffice mailing list