diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-03-09 09:52:07 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-01-02 21:06:37 +0100 |
commit | a70fde1b45859bbe557261493bfff40aa90d469a (patch) | |
tree | 50589bf680a676fe7e0ba7b3d8bd527971d1ca22 /src/nvim/fileio.c | |
parent | 5fba8159213e7821d16cdbea379cb49ac8a6ee74 (diff) | |
download | rneovim-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/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index fe12a69801..c631057e81 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -5997,9 +5997,8 @@ void do_autocmd(char_u *arg_in, int forceit) char_u *pat; char_u *envpat = NULL; char_u *cmd; - event_T event; - int need_free = FALSE; - int nested = FALSE; + int need_free = false; + int nested = false; int group; if (*arg == '|') { @@ -6082,7 +6081,7 @@ void do_autocmd(char_u *arg_in, int forceit) last_event = (event_T)-1; // for listing the event name last_group = AUGROUP_ERROR; // for listing the group name if (*arg == '*' || *arg == NUL || *arg == '|') { - for (event = (event_T)0; (int)event < (int)NUM_EVENTS; + for (event_T event = (event_T)0; (int)event < (int)NUM_EVENTS; event = (event_T)((int)event + 1)) { if (do_autocmd_event(event, pat, nested, cmd, forceit, group) == FAIL) { break; |