diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-11-15 11:44:37 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-11-15 11:44:37 -0500 |
commit | bc812a82f87644e184b17517936fddf6ff1221e3 (patch) | |
tree | ca6faf2bbc85d9098b6663d2d236ca761175cb2f /src/nvim/quickfix.c | |
parent | b299c011a04e6c14ec7dc9fd50a58f4a9e5afd40 (diff) | |
parent | 150b0d66e11dc69b1a4fc3daad3016fa74bee4d9 (diff) | |
download | rneovim-bc812a82f87644e184b17517936fddf6ff1221e3.tar.gz rneovim-bc812a82f87644e184b17517936fddf6ff1221e3.tar.bz2 rneovim-bc812a82f87644e184b17517936fddf6ff1221e3.zip |
Merge pull request #1460 from elmart/clang-analysis-fixes-3
Fix clang analysis warnings. (3)
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 5ffd5ea263..3de7f73339 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -10,6 +10,7 @@ * quickfix.c: functions for quickfix mode, using a file with error messages */ +#include <assert.h> #include <errno.h> #include <inttypes.h> #include <stdbool.h> @@ -880,7 +881,7 @@ void qf_free_all(win_T *wp) static int qf_add_entry ( qf_info_T *qi, /* quickfix list */ - qfline_T **prevp, /* pointer to previously added entry or NULL */ + qfline_T **prevp, /* nonnull pointer (to previously added entry or NULL) */ char_u *dir, /* optional directory name */ char_u *fname, /* file name or NULL */ int bufnum, /* buffer number or zero */ @@ -920,6 +921,7 @@ qf_add_entry ( qi->qf_lists[qi->qf_curlist].qf_start = qfp; qfp->qf_prev = qfp; /* first element points to itself */ } else { + assert(*prevp); qfp->qf_prev = *prevp; (*prevp)->qf_next = qfp; } |