mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
Fix warnings: ex_cmds2.c: ex_listdo(): Np dereference: FP.
Problem : Dereference of null pointer @ 1909. Diagnostic : False positive. Rationale : Suggested path error first assumes tp == NULL and later one valid_tabpage(tp), which is not possible. Resolution : Assert tp != NULL if valid_tabpage(tp).
This commit is contained in:
@@ -1906,6 +1906,7 @@ void ex_listdo(exarg_T *eap)
|
|||||||
/* go to window "tp" */
|
/* go to window "tp" */
|
||||||
if (!valid_tabpage(tp))
|
if (!valid_tabpage(tp))
|
||||||
break;
|
break;
|
||||||
|
assert(tp);
|
||||||
goto_tabpage_tp(tp, TRUE, TRUE);
|
goto_tabpage_tp(tp, TRUE, TRUE);
|
||||||
tp = tp->tp_next;
|
tp = tp->tp_next;
|
||||||
} else if (eap->cmdidx == CMD_bufdo) {
|
} else if (eap->cmdidx == CMD_bufdo) {
|
||||||
|
Reference in New Issue
Block a user