diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-17 10:24:07 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-18 22:00:02 +0100 |
commit | 34a4a01e4efb690743de0fe60d98a3ebed1bd681 (patch) | |
tree | 5aa26dd2bb012585f30e0a478c161b6743c17846 /src/nvim/eval.c | |
parent | eb15d8777be0fe9a044b153a5f0991e1eb90faa9 (diff) | |
download | rneovim-34a4a01e4efb690743de0fe60d98a3ebed1bd681.tar.gz rneovim-34a4a01e4efb690743de0fe60d98a3ebed1bd681.tar.bz2 rneovim-34a4a01e4efb690743de0fe60d98a3ebed1bd681.zip |
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.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index b8d1799e9a..af7a2d0118 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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; |