changeset 16221:331dc836f866 v8.1.1115

patch 8.1.1115: cannot build with older C compiler commit https://github.com/vim/vim/commit/8f4aeb5572d604d1540ee0cb7e721b5f0cc6d612 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 4 15:40:56 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 04 Apr 2019 15:45:05 +0200
parents 56c09904eb91
children 5a55ab44b5a1
files src/autocmd.c src/version.c
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -391,10 +391,10 @@ au_cleanup(void)
 	prev_ap = &(first_autopat[(int)event]);
 	for (ap = *prev_ap; ap != NULL; ap = *prev_ap)
 	{
+	    int has_cmd = FALSE;
+
 	    // loop over all commands for this pattern
 	    prev_ac = &(ap->cmds);
-	    int has_cmd = FALSE;
-
 	    for (ac = *prev_ac; ac != NULL; ac = *prev_ac)
 	    {
 		// remove the command if the pattern is to be deleted or when
@@ -405,17 +405,17 @@ au_cleanup(void)
 		    vim_free(ac->cmd);
 		    vim_free(ac);
 		}
-		else {
+		else
+		{
 		    has_cmd = TRUE;
 		    prev_ac = &(ac->next);
 		}
 	    }
 
-	    if (ap->pat != NULL && !has_cmd) {
+	    if (ap->pat != NULL && !has_cmd)
 		// Pattern was not marked for deletion, but all of its
 		// commands were.  So mark the pattern for deletion.
 		au_remove_pat(ap);
-	    }
 
 	    // remove the pattern if it has been marked for deletion
 	    if (ap->pat == NULL)
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1115,
+/**/
     1114,
 /**/
     1113,