diff options
Diffstat (limited to 'src/nvim/eval')
-rw-r--r-- | src/nvim/eval/decode.c | 3 | ||||
-rw-r--r-- | src/nvim/eval/encode.c | 3 | ||||
-rw-r--r-- | src/nvim/eval/executor.c | 3 | ||||
-rw-r--r-- | src/nvim/eval/gc.c | 3 | ||||
-rw-r--r-- | src/nvim/eval/typval.c | 10 | ||||
-rw-r--r-- | src/nvim/eval/typval_encode.c.h | 6 |
6 files changed, 21 insertions, 7 deletions
diff --git a/src/nvim/eval/decode.c b/src/nvim/eval/decode.c index a7dc6b205d..8905317f15 100644 --- a/src/nvim/eval/decode.c +++ b/src/nvim/eval/decode.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + #include <stddef.h> #include <msgpack.h> diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index c058c3a9c0..742497c1ca 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + /// @file encode.c /// /// File containing functions for encoding and decoding VimL values. diff --git a/src/nvim/eval/executor.c b/src/nvim/eval/executor.c index ec6c86ac64..91bb61323f 100644 --- a/src/nvim/eval/executor.c +++ b/src/nvim/eval/executor.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + #include "nvim/eval/typval.h" #include "nvim/eval/executor.h" #include "nvim/eval.h" diff --git a/src/nvim/eval/gc.c b/src/nvim/eval/gc.c index 5ce52ddd70..2bbf78d827 100644 --- a/src/nvim/eval/gc.c +++ b/src/nvim/eval/gc.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + #include "nvim/eval/typval.h" #include "nvim/eval/gc.h" diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index d5177138b0..786b766689 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + #include <stdio.h> #include <stddef.h> #include <string.h> @@ -136,7 +139,7 @@ void tv_list_watch_fix(list_T *const l, const listitem_T *const item) /// /// @return [allocated] new list. list_T *tv_list_alloc(void) - FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC + FUNC_ATTR_NONNULL_RET { list_T *const list = xcalloc(1, sizeof(list_T)); @@ -1011,7 +1014,6 @@ void tv_dict_item_free(dictitem_T *const item) /// @return [allocated] new dictionary item. static dictitem_T *tv_dict_item_copy(dictitem_T *const di) FUNC_ATTR_NONNULL_RET FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT - FUNC_ATTR_MALLOC { dictitem_T *const new_di = tv_dict_item_alloc((const char *)di->di_key); tv_copy(&di->di_tv, &new_di->di_tv); @@ -1040,7 +1042,7 @@ void tv_dict_item_remove(dict_T *const dict, dictitem_T *const item) /// /// @return [allocated] new dictionary. dict_T *tv_dict_alloc(void) - FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT + FUNC_ATTR_NONNULL_RET FUNC_ATTR_WARN_UNUSED_RESULT { dict_T *const d = xmalloc(sizeof(dict_T)); @@ -1577,7 +1579,7 @@ void tv_dict_set_keys_readonly(dict_T *const dict) /// /// @return [allocated] pointer to the created list. list_T *tv_list_alloc_ret(typval_T *const ret_tv) - FUNC_ATTR_NONNULL_ALL FUNC_ATTR_MALLOC + FUNC_ATTR_NONNULL_ALL { list_T *const l = tv_list_alloc(); ret_tv->vval.v_list = l; diff --git a/src/nvim/eval/typval_encode.c.h b/src/nvim/eval/typval_encode.c.h index ad54eef4a0..b4a70fb188 100644 --- a/src/nvim/eval/typval_encode.c.h +++ b/src/nvim/eval/typval_encode.c.h @@ -489,7 +489,7 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE( } if (is_string) { TYPVAL_ENCODE_CONV_STR_STRING(tv, buf, len); - } else { + } else { // -V523 TYPVAL_ENCODE_CONV_STRING(tv, buf, len); } xfree(buf); @@ -611,7 +611,7 @@ _convert_one_value_regular_dict: {} typval_encode_stop_converting_one_item: return OK; // Prevent “unused label” warnings. - goto typval_encode_stop_converting_one_item; + goto typval_encode_stop_converting_one_item; // -V779 } TYPVAL_ENCODE_SCOPE int _TYPVAL_ENCODE_ENCODE( @@ -814,6 +814,6 @@ encode_vim_to__error_ret: _mp_destroy(mpstack); return FAIL; // Prevent “unused label” warnings. - goto typval_encode_stop_converting_one_item; + goto typval_encode_stop_converting_one_item; // -V779 } #endif // NVIM_EVAL_TYPVAL_ENCODE_C_H |