aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-12-14 20:13:31 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2014-12-16 21:00:17 +0100
commit9b1c9393709a42e6999e4c29f7d0249ae9d8b7be (patch)
tree029b3bc0cae1f2dc216a57d295c5ba51d9e4f874
parent3a61b84543c7cd843fe60d9ec4b356fb18f6a726 (diff)
downloadrneovim-9b1c9393709a42e6999e4c29f7d0249ae9d8b7be.tar.gz
rneovim-9b1c9393709a42e6999e4c29f7d0249ae9d8b7be.tar.bz2
rneovim-9b1c9393709a42e6999e4c29f7d0249ae9d8b7be.zip
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.
-rw-r--r--src/nvim/ex_docmd.c4
1 files changed, 3 insertions, 1 deletions
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);
}
}