]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.0.0506: can't build with ANSI C v8.0.0506
authorBram Moolenaar <Bram@vim.org>
Sat, 25 Mar 2017 14:07:43 +0000 (15:07 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 25 Mar 2017 14:07:43 +0000 (15:07 +0100)
Problem:    Can't build with ANSI C.
Solution:   Move declarations to start of block.

src/ex_docmd.c
src/version.c

index 17fec33ecd0328afc10dbd34c7b9a47647338806..9782557c13ea317fb2fb68402f4ff50ceb6540fb 100644 (file)
@@ -3250,6 +3250,9 @@ find_command(exarg_T *eap, int *full UNUSED)
 
        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 UNUSED)
 
            /* 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)];
index 971709422668c7d95c510e2a5fd982bd2e1d4dad..e19da86a1296f5e272bbf2b8849df4e9c8a2cad9 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    506,
 /**/
     505,
 /**/