changeset 11240:06307d812ca7 v8.0.0506

patch 8.0.0506: can't build with ANSI C commit https://github.com/vim/vim/commit/6c0c1e8052811a818739e2f3d543291b7a347ad0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 25 15:07:43 2017 +0100 patch 8.0.0506: can't build with ANSI C Problem: Can't build with ANSI C. Solution: Move declarations to start of block.
author Christian Brabandt <cb@256bit.org>
date Sat, 25 Mar 2017 15:15:05 +0100
parents 1b22eac86341
children 5eda6979da94
files src/ex_docmd.c src/version.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3250,6 +3250,9 @@ find_command(exarg_T *eap, int *full UNU
 
 	if (ASCII_ISLOWER(eap->cmd[0]))
 	{
+	    int c1 = eap->cmd[0];
+	    int c2 = eap->cmd[1];
+
 	    if (command_count != (int)CMD_SIZE)
 	    {
 		iemsg((char_u *)_("E943: Command table needs to be updated, run 'make cmdidxs'"));
@@ -3258,8 +3261,6 @@ find_command(exarg_T *eap, int *full UNU
 
 	    /* Use a precomputed index for fast look-up in cmdnames[]
 	     * taking into account the first 2 letters of eap->cmd. */
-	    int c1 = eap->cmd[0];
-	    int c2 = eap->cmd[1];
 	    eap->cmdidx = cmdidxs1[CharOrdLow(c1)];
 	    if (ASCII_ISLOWER(c2))
 		eap->cmdidx += cmdidxs2[CharOrdLow(c1)][CharOrdLow(c2)];
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    506,
+/**/
     505,
 /**/
     504,