Replace coverity annotation by assertions

This commit is contained in:
Jean-Marc Lasgouttes 2017-03-31 11:47:47 +02:00
parent cb888293d4
commit 6b2444a7df

View File

@ -3253,10 +3253,9 @@ void GuiView::dispatchVC(FuncRequest const & cmd, DispatchResult & dr)
string rev1 = cmd.getArg(0); string rev1 = cmd.getArg(0);
string f1, f2; string f1, f2;
LATTEST(buffer)
// f1 // f1
// it seems safe to assume we have a buffer
// coverity[FORWARD_NULL]
if (!buffer->lyxvc().prepareFileRevision(rev1, f1)) if (!buffer->lyxvc().prepareFileRevision(rev1, f1))
break; break;
@ -4019,9 +4018,9 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
break; break;
case LFUN_FORWARD_SEARCH: { case LFUN_FORWARD_SEARCH: {
// it seems safe to assume we have a document buffer, since // it seems safe to assume we have a document buffer, since
// getStatus wants one. // getStatus wants one.
// coverity[FORWARD_NULL] LATTEST(doc_buffer);
Buffer const * doc_master = doc_buffer->masterBuffer(); Buffer const * doc_master = doc_buffer->masterBuffer();
FileName const path(doc_master->temppath()); FileName const path(doc_master->temppath());
string const texname = doc_master->isChild(doc_buffer) string const texname = doc_master->isChild(doc_buffer)