mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
Fix warnings: ex_cmds2.c: ex_listdo(): Np dereference: FP.
Problem : Dereference of null pointer @ 1903. Diagnostic : False positive. Rationale : Suggested error path first assumes wp == NULL and later one win_valid(wp), which is not possible. Resolution : Assert wp != NULL if win_valid(wp).
This commit is contained in:
@@ -1897,6 +1897,7 @@ void ex_listdo(exarg_T *eap)
|
|||||||
/* go to window "wp" */
|
/* go to window "wp" */
|
||||||
if (!win_valid(wp))
|
if (!win_valid(wp))
|
||||||
break;
|
break;
|
||||||
|
assert(wp);
|
||||||
win_goto(wp);
|
win_goto(wp);
|
||||||
if (curwin != wp)
|
if (curwin != wp)
|
||||||
break; /* something must be wrong */
|
break; /* something must be wrong */
|
||||||
|
Reference in New Issue
Block a user