diff options
author | ZyX <kp-pav@yandex.ru> | 2016-05-01 20:35:51 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-05-01 20:35:51 +0300 |
commit | cf4e1fb0f4962319eee292248d9c1f73be3a8d0c (patch) | |
tree | 60b1d2aad6205c74b7c2611fbbed45759a302f4f /src/nvim/quickfix.c | |
parent | a1f985f60a228604970a70872b7ea1fb5299eba3 (diff) | |
download | rneovim-cf4e1fb0f4962319eee292248d9c1f73be3a8d0c.tar.gz rneovim-cf4e1fb0f4962319eee292248d9c1f73be3a8d0c.tar.bz2 rneovim-cf4e1fb0f4962319eee292248d9c1f73be3a8d0c.zip |
*: Fix new linter errors
Originally there were 128 new errors, so I thought this is a good idea to fix
all of them. Of course, this commit also fixes many suppressed errors.
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 97db69d3f3..17cb8a86aa 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -2757,8 +2757,8 @@ void ex_cc(exarg_T *eap) // For cdo and ldo commands, jump to the nth valid error. // For cfdo and lfdo commands, jump to the nth valid file entry. - if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo || - eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo) { + if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo + || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo) { size_t n; if (eap->addr_count > 0) { assert(eap->line1 >= 0); @@ -2801,9 +2801,9 @@ void ex_cnext(exarg_T *eap) } int errornr; - if (eap->addr_count > 0 && - (eap->cmdidx != CMD_cdo && eap->cmdidx != CMD_ldo && - eap->cmdidx != CMD_cfdo && eap->cmdidx != CMD_lfdo)) { + if (eap->addr_count > 0 + && (eap->cmdidx != CMD_cdo && eap->cmdidx != CMD_ldo + && eap->cmdidx != CMD_cfdo && eap->cmdidx != CMD_lfdo)) { errornr = (int)eap->line2; } else { errornr = 1; @@ -2972,16 +2972,18 @@ void ex_vimgrep(exarg_T *eap) goto theend; } - if ((eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd && - eap->cmdidx != CMD_vimgrepadd && eap->cmdidx != CMD_lvimgrepadd) - || qi->qf_curlist == qi->qf_listcount) - /* make place for a new list */ + if ((eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd + && eap->cmdidx != CMD_vimgrepadd && eap->cmdidx != CMD_lvimgrepadd) + || qi->qf_curlist == qi->qf_listcount) { + // make place for a new list qf_new_list(qi, *eap->cmdlinep); - else if (qi->qf_lists[qi->qf_curlist].qf_count > 0) - /* Adding to existing list, find last entry. */ + } else if (qi->qf_lists[qi->qf_curlist].qf_count > 0) { + // Adding to existing list, find last entry. for (prevp = qi->qf_lists[qi->qf_curlist].qf_start; - prevp->qf_next != prevp; prevp = prevp->qf_next) - ; + prevp->qf_next != prevp; + prevp = prevp->qf_next) { + } + } /* parse the list of arguments */ if (get_arglist_exp(p, &fcount, &fnames, true) == FAIL) |