From aa62b1ad495517f5f966cb27146d17639e669230 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 4 Apr 2017 09:35:55 +0200 Subject: [PATCH] Try another way of convincing coverity that everything is fine We have a false positive here, but annotating with coverity[] comments is not very convenient. Let's try to use good old assertions instead. --- src/insets/InsetBibitem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetBibitem.cpp b/src/insets/InsetBibitem.cpp index 22abdf02d6..ae6105bb62 100644 --- a/src/insets/InsetBibitem.cpp +++ b/src/insets/InsetBibitem.cpp @@ -36,6 +36,7 @@ #include "frontends/alert.h" +#include "support/lassert.h" #include "support/convert.h" #include "support/debug.h" #include "support/docstream.h" @@ -67,11 +68,12 @@ InsetBibitem::InsetBibitem(Buffer * buf, InsetCommandParams const & p) InsetBibitem::~InsetBibitem() { - if (isBufferLoaded()) + if (isBufferLoaded()) { /* Coverity believes that this may throw an exception, but * actually this code path is not taken when buffer_ == 0 */ - // coverity[fun_call_w_exception] + LATTEST(buffer_); buffer().invalidateBibinfoCache(); + } }