Skip to content

Commit 6c0c1e8

Browse files
committed
patch 8.0.0506: can't build with ANSI C
Problem: Can't build with ANSI C. Solution: Move declarations to start of block.
1 parent ba6ad17 commit 6c0c1e8

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/ex_docmd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3250,6 +3250,9 @@ find_command(exarg_T *eap, int *full UNUSED)
32503250

32513251
if (ASCII_ISLOWER(eap->cmd[0]))
32523252
{
3253+
int c1 = eap->cmd[0];
3254+
int c2 = eap->cmd[1];
3255+
32533256
if (command_count != (int)CMD_SIZE)
32543257
{
32553258
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)
32583261

32593262
/* Use a precomputed index for fast look-up in cmdnames[]
32603263
* taking into account the first 2 letters of eap->cmd. */
3261-
int c1 = eap->cmd[0];
3262-
int c2 = eap->cmd[1];
32633264
eap->cmdidx = cmdidxs1[CharOrdLow(c1)];
32643265
if (ASCII_ISLOWER(c2))
32653266
eap->cmdidx += cmdidxs2[CharOrdLow(c1)][CharOrdLow(c2)];

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
506,
767769
/**/
768770
505,
769771
/**/

0 commit comments

Comments
 (0)