diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-15 13:49:35 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-21 23:05:18 +0100 |
commit | 76635847086344b1b6e7ac9e9a4d9276852be000 (patch) | |
tree | e25de85ac1cbf8f3681dde7b7c58084c017b701b | |
parent | 26033eee1d3b68697c21c1bee7cae3494732f0b0 (diff) | |
download | rneovim-76635847086344b1b6e7ac9e9a4d9276852be000.tar.gz rneovim-76635847086344b1b6e7ac9e9a4d9276852be000.tar.bz2 rneovim-76635847086344b1b6e7ac9e9a4d9276852be000.zip |
refactor: remove __clang_analyzer__ macro
It is less intrusive to silence the warning with a comment instead of a
macro if needed.
-rw-r--r-- | src/nvim/eval/userfunc.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index e15320e391..c2c4405c31 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -671,9 +671,7 @@ static void cat_func_name(char *buf, size_t buflen, ufunc_T *fp) /// Add a number variable "name" to dict "dp" with value "nr". static void add_nr_var(dict_T *dp, dictitem_T *v, char *name, varnumber_T nr) { -#ifndef __clang_analyzer__ STRCPY(v->di_key, name); -#endif v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; hash_add(&dp->dv_hashtab, v->di_key); v->di_tv.v_type = VAR_NUMBER; @@ -976,10 +974,8 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett // Set l:self to "selfdict". Use "name" to avoid a warning from // some compiler that checks the destination size. v = (dictitem_T *)&fc->fc_fixvar[fixvar_idx++]; -#ifndef __clang_analyzer__ name = (char *)v->di_key; STRCPY(name, "self"); -#endif v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; hash_add(&fc->fc_l_vars.dv_hashtab, v->di_key); v->di_tv.v_type = VAR_DICT; @@ -1002,10 +998,8 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett // Use "name" to avoid a warning from some compiler that checks the // destination size. v = (dictitem_T *)&fc->fc_fixvar[fixvar_idx++]; -#ifndef __clang_analyzer__ name = (char *)v->di_key; STRCPY(name, "000"); -#endif v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; hash_add(&fc->fc_l_avars.dv_hashtab, v->di_key); v->di_tv.v_type = VAR_LIST; |