mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warnings: eval.c: do_return(): Np dereference: FP.
Problem : Dereference of null pointer @ 18841. Diagnostic : False positive. Rationale : Suggested error path takes `reanimate` branch at 18827, assigning `rettv = current_funccal->rettv`. Then, inmediately after, it supposes rettv is null, which cannot happen, since current_funccal->rettv should always be non null. Resolution : Assert current_funccal->rettv non null.
This commit is contained in:
parent
97be8d45f4
commit
5c00f8c132
@ -18901,8 +18901,10 @@ int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv)
|
|||||||
else {
|
else {
|
||||||
/* When undoing a return in order to make it pending, get the stored
|
/* When undoing a return in order to make it pending, get the stored
|
||||||
* return rettv. */
|
* return rettv. */
|
||||||
if (reanimate)
|
if (reanimate) {
|
||||||
|
assert(current_funccal->rettv);
|
||||||
rettv = current_funccal->rettv;
|
rettv = current_funccal->rettv;
|
||||||
|
}
|
||||||
|
|
||||||
if (rettv != NULL) {
|
if (rettv != NULL) {
|
||||||
/* Store the value of the pending return. */
|
/* Store the value of the pending return. */
|
||||||
|
Loading…
Reference in New Issue
Block a user