aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-11 11:25:00 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-03-11 11:38:15 +0800
commitd71791a11a260ca81067d63d69b5970078fffb6d (patch)
tree4772f26de1e7323296dbe70efc97f4302d0cf3f0 /src
parent5931f2bc4ac319e5fa617b36cbe5305228125c11 (diff)
downloadrneovim-d71791a11a260ca81067d63d69b5970078fffb6d.tar.gz
rneovim-d71791a11a260ca81067d63d69b5970078fffb6d.tar.bz2
rneovim-d71791a11a260ca81067d63d69b5970078fffb6d.zip
vim-patch:9.1.0152: Coverity complains about ignoring return value
Problem: Coverity complains about ignoring return value of win_split() (after v9.1.150) Solution: Check if win_split() failed, add winfixbuf.res to Makefile https://github.com/vim/vim/commit/af7ae8160041e2d17c56945381e9370e7178e596 Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_cmds2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index dacdb27b08..732631b678 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -457,8 +457,9 @@ void ex_listdo(exarg_T *eap)
}
if (curwin->w_p_wfb) {
// Split the window, which will be 'nowinfixbuf', and set curwin to that
- win_split(0, 0);
-
+ if (win_split(0, 0) == FAIL) {
+ return; // error message already given
+ }
if (curwin->w_p_wfb) {
// Autocommands set 'winfixbuf' or sent us to another window
// with it set. Give up.