aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/eval/typval.c7
-rw-r--r--src/nvim/ops.c1
-rw-r--r--src/nvim/option.c2
-rw-r--r--src/nvim/os/fileio.c2
-rw-r--r--src/nvim/os/shell.c2
5 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c
index eb6db9547b..70ec3dfe39 100644
--- a/src/nvim/eval/typval.c
+++ b/src/nvim/eval/typval.c
@@ -136,7 +136,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 +1011,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 +1039,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 +1576,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/ops.c b/src/nvim/ops.c
index f11d6b69b2..5212ec45ab 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -802,7 +802,6 @@ static bool is_append_register(int regname)
/// Returns a copy of contents in register `name`
/// for use in do_put. Should be freed by caller.
yankreg_T *copy_register(int name)
- FUNC_ATTR_MALLOC
FUNC_ATTR_NONNULL_RET
{
yankreg_T *reg = get_yank_register(name, YREG_PASTE);
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 458d80716c..0070a0056d 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -6974,7 +6974,7 @@ bool signcolumn_on(win_T *wp)
/// Get window or buffer local options
dict_T *get_winbuf_options(const int bufopt)
- FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_MALLOC
+ FUNC_ATTR_WARN_UNUSED_RESULT
{
dict_T *const d = tv_dict_alloc();
diff --git a/src/nvim/os/fileio.c b/src/nvim/os/fileio.c
index 4b7b53fc7f..3c47c66196 100644
--- a/src/nvim/os/fileio.c
+++ b/src/nvim/os/fileio.c
@@ -100,7 +100,7 @@ int file_open(FileDescriptor *const ret_fp, const char *const fname,
/// @return [allocated] Opened file or NULL in case of error.
FileDescriptor *file_open_new(int *const error, const char *const fname,
const int flags, const int mode)
- FUNC_ATTR_NONNULL_ALL FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT
+ FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
{
FileDescriptor *const fp = xmalloc(sizeof(*fp));
if ((*error = file_open(fp, fname, flags, mode)) != 0) {
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index 5cc9d4b79b..29c0431521 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -47,7 +47,7 @@ typedef struct {
/// @param extra_args Extra arguments to the shell, or NULL.
/// @return Newly allocated argument vector. Must be freed with shell_free_argv.
char **shell_build_argv(const char *cmd, const char *extra_args)
- FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC
+ FUNC_ATTR_NONNULL_RET
{
size_t argc = tokenize(p_sh, NULL) + (cmd ? tokenize(p_shcf, NULL) : 0);
char **rv = xmalloc((argc + 4) * sizeof(*rv));