Coverity flags this code as not handling exception that may happen in buffer().
My own analysis is that this can never happen because isBufferValid()
does check whether buffer_ is null.
Any insght appreciated. The commit should be expeanded to more cases, actually.
/// 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
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();
}
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();
}
}
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_;
}