mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
Fix warnings: eval.c: get_user_func_name(): Np dereference: FP.
Problem : Dereference of null pointer @ 18216. Diagnostic : False positive. Rationale : `hi` and `done` are static. Intended usage is for the first call to have idx == 0, so that they are initialized. Resolution : Assert hi after (optional) initialization.
This commit is contained in:
@@ -18280,6 +18280,7 @@ char_u *get_user_func_name(expand_T *xp, int idx)
|
||||
done = 0;
|
||||
hi = func_hashtab.ht_array;
|
||||
}
|
||||
assert(hi);
|
||||
if (done < func_hashtab.ht_used) {
|
||||
if (done++ > 0)
|
||||
++hi;
|
||||
|
Reference in New Issue
Block a user