aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-04-21 20:06:15 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-24 10:31:31 -0300
commitf298be9fe1392adbfaa86846ef2795b7446f8d6b (patch)
tree78692ab529acf12be37e13104c6e57c253c3e3d8
parent244ca83be50ae0a4d3b25cadc4a28a3a57768a99 (diff)
downloadrneovim-f298be9fe1392adbfaa86846ef2795b7446f8d6b.tar.gz
rneovim-f298be9fe1392adbfaa86846ef2795b7446f8d6b.tar.bz2
rneovim-f298be9fe1392adbfaa86846ef2795b7446f8d6b.zip
Add FUNC_ATTR_NONNULL_RET to some functions
-rw-r--r--src/garray.h4
-rw-r--r--src/path.h8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/garray.h b/src/garray.h
index 163ee92aef..f6ab86ba59 100644
--- a/src/garray.h
+++ b/src/garray.h
@@ -1,6 +1,8 @@
#ifndef NEOVIM_GARRAY_H
#define NEOVIM_GARRAY_H
+#include "func_attr.h"
+
/// Structure used for growing arrays.
/// This is used to store information that only grows, is deleted all at
/// once, and needs to be accessed by index. See ga_clear() and ga_grow().
@@ -18,7 +20,7 @@ void ga_clear(garray_T *gap);
void ga_clear_strings(garray_T *gap);
void ga_init(garray_T *gap, int itemsize, int growsize);
void ga_grow(garray_T *gap, int n);
-char_u *ga_concat_strings(garray_T *gap);
+char_u *ga_concat_strings(garray_T *gap) FUNC_ATTR_NONNULL_RET;
void ga_remove_duplicate_strings(garray_T *gap);
void ga_concat(garray_T *gap, char_u *s);
void ga_append(garray_T *gap, int c);
diff --git a/src/path.h b/src/path.h
index 295b0ebbd8..1621157023 100644
--- a/src/path.h
+++ b/src/path.h
@@ -1,6 +1,9 @@
#ifndef NEOVIM_PATH_H
#define NEOVIM_PATH_H
+#include "func_attr.h"
+#include "types.h"
+
/// Return value for the comparison of two files. Also @see path_full_compare.
typedef enum file_comparison {
kEqualFiles = 1, ///< Both exist and are the same file.
@@ -54,7 +57,8 @@ void shorten_dir(char_u *str);
int dir_of_file_exists(char_u *fname);
int vim_fnamecmp(char_u *x, char_u *y);
int vim_fnamencmp(char_u *x, char_u *y, size_t len);
-char_u *concat_fnames(char_u *fname1, char_u *fname2, int sep);
+char_u *concat_fnames(char_u *fname1, char_u *fname2, int sep)
+ FUNC_ATTR_NONNULL_RET;
int unix_expandpath(garray_T *gap, char_u *path, int wildoff, int flags,
int didstar);
int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file,
@@ -62,7 +66,7 @@ int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file,
int flags);
void addfile(garray_T *gap, char_u *f, int flags);
char_u *get_past_head(char_u *path);
-char_u *concat_str(char_u *str1, char_u *str2);
+char_u *concat_str(char_u *str1, char_u *str2) FUNC_ATTR_NONNULL_RET;
void add_pathsep(char_u *p);
char_u *FullName_save(char_u *fname, int force);
void simplify_filename(char_u *filename);