diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-11-10 20:05:42 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-11-10 20:05:42 -0500 |
commit | fc19f0c4c6773ff8b10c14492da2acf3601d8cbc (patch) | |
tree | 68ecc9a6718caf0cdb1bca365ce6373944af1357 /src/nvim/fold.c | |
parent | 3080672650b1a6583684edfdafef7e07c0c7cf56 (diff) | |
parent | a6548e4fb34d50fbd49d0878618c3aecefabe79b (diff) | |
download | rneovim-fc19f0c4c6773ff8b10c14492da2acf3601d8cbc.tar.gz rneovim-fc19f0c4c6773ff8b10c14492da2acf3601d8cbc.tar.bz2 rneovim-fc19f0c4c6773ff8b10c14492da2acf3601d8cbc.zip |
Merge pull request #1431 from elmart/clang-analysis-fixes-2
Fix clang analysis warnings. (2)
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r-- | src/nvim/fold.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 95f1e054b9..6014dbfd15 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -22,6 +22,7 @@ #include "nvim/diff.h" #include "nvim/eval.h" #include "nvim/ex_docmd.h" +#include "nvim/func_attr.h" #include "nvim/indent.h" #include "nvim/mark.h" #include "nvim/memline.h" @@ -1680,7 +1681,9 @@ static void foldDelMarker(linenr_T lnum, char_u *marker, int markerlen) * When 'foldtext' isn't set puts the result in "buf[51]". Otherwise the * result is in allocated memory. */ -char_u *get_foldtext(win_T *wp, linenr_T lnum, linenr_T lnume, foldinfo_T *foldinfo, char_u *buf) +char_u *get_foldtext(win_T *wp, linenr_T lnum, linenr_T lnume, + foldinfo_T *foldinfo, char_u *buf) + FUNC_ATTR_NONNULL_ARG(1) { char_u *text = NULL; /* an error occurred when evaluating 'fdt' setting */ @@ -1689,8 +1692,7 @@ char_u *get_foldtext(win_T *wp, linenr_T lnum, linenr_T lnume, foldinfo_T *foldi static win_T *last_wp = NULL; static linenr_T last_lnum = 0; - if (last_wp != wp || last_wp == NULL - || last_lnum > lnum || last_lnum == 0) + if (last_wp == NULL || last_wp != wp || last_lnum > lnum || last_lnum == 0) /* window changed, try evaluating foldtext setting once again */ got_fdt_error = FALSE; |