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 f1, f2;
LATTEST(buffer)
// f1
// it seems safe to assume we have a buffer
// coverity[FORWARD_NULL]
if (!buffer->lyxvc().prepareFileRevision(rev1, f1))
break;
@ -4021,7 +4020,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
case LFUN_FORWARD_SEARCH: {
// it seems safe to assume we have a document buffer, since
// getStatus wants one.
// coverity[FORWARD_NULL]
LATTEST(doc_buffer);
Buffer const * doc_master = doc_buffer->masterBuffer();
FileName const path(doc_master->temppath());
string const texname = doc_master->isChild(doc_buffer)