From 9b1c9393709a42e6999e4c29f7d0249ae9d8b7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eliseo=20Marti=CC=81nez?= Date: Sun, 14 Dec 2014 20:13:31 +0100 Subject: [PATCH] coverity/13695: Unchecked return value: RI. Problem : Unchecked return value (CHECKED_RETURN) @ 8554. Diagnostic : Real issue. Rationale : Other invocations of `do_source` are checked and generate an error message if fail. There seems to be no reason why this particular instance could not fail the same. Resolution : Check invocation and generate error message on failure. --- src/nvim/ex_docmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 56c8206d2a..65a0017e20 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -8543,7 +8543,9 @@ static void ex_loadview(exarg_T *eap) fname = get_view_file(*eap->arg); if (fname != NULL) { - do_source(fname, FALSE, DOSO_NONE); + if (do_source(fname, FALSE, DOSO_NONE) == FAIL) { + EMSG2(_(e_notopen), fname); + } free(fname); } }