comparison src/ex_cmds2.c @ 34489:4dd6d243e4f7 v9.1.0152

patch 9.1.0152: Coverity complains about ignoring return value Commit: https://github.com/vim/vim/commit/af7ae8160041e2d17c56945381e9370e7178e596 Author: Christian Brabandt <cb@256bit.org> Date: Wed Mar 6 19:31:39 2024 +0100 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
author Christian Brabandt <cb@256bit.org>
date Wed, 06 Mar 2024 21:00:08 +0100
parents 157cf882799f
children 4da97f213d15
comparison
equal deleted inserted replaced
34488:bba7ce0467f1 34489:4dd6d243e4f7
467 emsg(_(e_winfixbuf_cannot_go_to_buffer)); 467 emsg(_(e_winfixbuf_cannot_go_to_buffer));
468 return; 468 return;
469 } 469 }
470 470
471 if (win_valid(prevwin) && !prevwin->w_p_wfb) 471 if (win_valid(prevwin) && !prevwin->w_p_wfb)
472 {
473 // 'winfixbuf' is set; attempt to change to a window without it. 472 // 'winfixbuf' is set; attempt to change to a window without it.
474 win_goto(prevwin); 473 win_goto(prevwin);
475 }
476 if (curwin->w_p_wfb) 474 if (curwin->w_p_wfb)
477 { 475 {
478 // Split the window, which will be 'nowinfixbuf', and set curwin to 476 // Split the window, which will be 'nowinfixbuf', and set curwin to
479 // that 477 // that
480 win_split(0, 0); 478 if (win_split(0, 0) == FAIL)
479 return; // error message already given
481 480
482 if (curwin->w_p_wfb) 481 if (curwin->w_p_wfb)
483 { 482 {
484 // Autocommands set 'winfixbuf' or sent us to another window 483 // Autocommands set 'winfixbuf' or sent us to another window
485 // with it set. Give up. 484 // with it set. Give up.