diff --git a/src/insets/Inset.h b/src/insets/Inset.h index 5d7f27f89f..3d93904fdb 100644 --- a/src/insets/Inset.h +++ b/src/insets/Inset.h @@ -112,8 +112,8 @@ public: /// reset associated Buffer to null value virtual void resetBuffer(); /// retrieve associated Buffer - virtual Buffer & buffer(); - virtual Buffer const & buffer() const; + Buffer & buffer(); + Buffer const & buffer() const; /// Returns true if buffer_ actually points to a Buffer that has /// been loaded into LyX and is still open. Note that this will /// always return false for cloned Buffers. If you want to allow diff --git a/src/insets/InsetBibitem.cpp b/src/insets/InsetBibitem.cpp index 18a261a3e0..1c8bc786db 100644 --- a/src/insets/InsetBibitem.cpp +++ b/src/insets/InsetBibitem.cpp @@ -68,6 +68,9 @@ InsetBibitem::InsetBibitem(Buffer * buf, InsetCommandParams const & p) InsetBibitem::~InsetBibitem() { if (isBufferLoaded()) + /* Coverity believs that this may throw an exception, but + * actually this code path is not taken when buffer_ == 0 */ + // coverity[exn_spec_violation] buffer().invalidateBibinfoCache(); } diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index ef794814ae..63ae8657f0 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -68,7 +68,11 @@ InsetBibtex::InsetBibtex(Buffer * buf, InsetCommandParams const & p) InsetBibtex::~InsetBibtex() { if (isBufferLoaded()) { + /* Coverity believs that this may throw an exception, but + * actually this code path is not taken when buffer_ == 0 */ + // coverity[exn_spec_violation] buffer().invalidateBibfileCache(); + // coverity[exn_spec_violation] buffer().removeBiblioTempFiles(); } } diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index b2eca71505..1c80afffd7 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -198,6 +198,9 @@ InsetInclude::InsetInclude(InsetInclude const & other) InsetInclude::~InsetInclude() { if (isBufferLoaded()) + /* Coverity believs that this may throw an exception, but + * actually this code path is not taken when buffer_ == 0 */ + // coverity[exn_spec_violation] buffer().invalidateBibfileCache(); delete label_; }