aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-03-09 09:52:07 -0500
committerJustin M. Keyes <justinkz@gmail.com>2019-01-02 21:06:37 +0100
commita70fde1b45859bbe557261493bfff40aa90d469a (patch)
tree50589bf680a676fe7e0ba7b3d8bd527971d1ca22 /src/nvim/quickfix.c
parent5fba8159213e7821d16cdbea379cb49ac8a6ee74 (diff)
downloadrneovim-a70fde1b45859bbe557261493bfff40aa90d469a.tar.gz
rneovim-a70fde1b45859bbe557261493bfff40aa90d469a.tar.bz2
rneovim-a70fde1b45859bbe557261493bfff40aa90d469a.zip
build: enable -Wshadow
Note about shada.c: - shada_read_next_item_start was intentionally shadowing `unpacked` and `i` because many of the macros (e.g. ADDITIONAL_KEY) implicitly depended on those variable names. - Macros were changed to parameterize `unpacked` (but not `i`). Macros like CLEAR_GA_AND_ERROR_OUT do control-flow (goto), so any other approach is messy.
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index d9e307bb71..4eeddf1d5a 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -925,11 +925,11 @@ restofline:
return QF_FAIL;
}
if (*fields->errmsg) {
- size_t len = STRLEN(qfprev->qf_text);
+ size_t textlen = STRLEN(qfprev->qf_text);
qfprev->qf_text = xrealloc(qfprev->qf_text,
- len + STRLEN(fields->errmsg) + 2);
- qfprev->qf_text[len] = '\n';
- STRCPY(qfprev->qf_text + len + 1, fields->errmsg);
+ textlen + STRLEN(fields->errmsg) + 2);
+ qfprev->qf_text[textlen] = '\n';
+ STRCPY(qfprev->qf_text + textlen + 1, fields->errmsg);
}
if (qfprev->qf_nr == -1) {
qfprev->qf_nr = fields->enr;