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:
Eliseo Martínez 2014-11-17 11:36:48 +01:00
parent 97be8d45f4
commit 5c00f8c132

View File

@ -18901,8 +18901,10 @@ int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv)
else {
/* When undoing a return in order to make it pending, get the stored
* return rettv. */
if (reanimate)
if (reanimate) {
assert(current_funccal->rettv);
rettv = current_funccal->rettv;
}
if (rettv != NULL) {
/* Store the value of the pending return. */