diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-16 21:50:20 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-17 02:18:55 -0400 |
commit | e99d1a7fbbb663bfacf583c939d4718e4a7d5107 (patch) | |
tree | 0044fe4efe59dd828a1e2a01c05148cbf0116673 /src | |
parent | 161cdba1e3b8b53f474b2e76655c8c1a5217802f (diff) | |
download | rneovim-e99d1a7fbbb663bfacf583c939d4718e4a7d5107.tar.gz rneovim-e99d1a7fbbb663bfacf583c939d4718e4a7d5107.tar.bz2 rneovim-e99d1a7fbbb663bfacf583c939d4718e4a7d5107.zip |
vim-patch:8.1.1115: cannot build with older C compiler
Problem: Cannot build with older C compiler.
Solution: Move variable declaration to start of block.
https://github.com/vim/vim/commit/8f4aeb5572d604d1540ee0cb7e721b5f0cc6d612
Diffstat (limited to 'src')
-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 f922591d0b..7740673bbe 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -5553,7 +5553,6 @@ static void au_del_cmd(AutoCmd *ac) static void au_cleanup(void) { AutoPat *ap, **prev_ap; - AutoCmd *ac, **prev_ac; event_T event; if (autocmd_busy || !au_need_clean) { @@ -5566,11 +5565,11 @@ static void au_cleanup(void) // Loop over all autocommand patterns. prev_ap = &(first_autopat[(int)event]); for (ap = *prev_ap; ap != NULL; ap = *prev_ap) { - // Loop over all commands for this pattern. - prev_ac = &(ap->cmds); bool has_cmd = false; - for (ac = *prev_ac; ac != NULL; ac = *prev_ac) { + // Loop over all commands for this pattern. + AutoCmd **prev_ac = &(ap->cmds); + for (AutoCmd *ac = *prev_ac; ac != NULL; ac = *prev_ac) { // Remove the command if the pattern is to be deleted or when // the command has been marked for deletion. if (ap->pat == NULL || ac->cmd == NULL) { |