Skip to content

Commit

Permalink
patch 8.1.1209: clever compiler warns for buffer being too small
Browse files Browse the repository at this point in the history
Problem:    Clever compiler warns for buffer being too small.
Solution:   Make the buffer bigger (even though it's not really needed).
  • Loading branch information
brammool committed Apr 26, 2019
1 parent c8cc0ad commit 5431589
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/evalfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5460,7 +5460,7 @@ f_getmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
for (i = 0; i < MAXPOSMATCH; ++i)
{
llpos_T *llpos;
char buf[6];
char buf[30]; // use 30 to avoid compiler warning
list_T *l;

llpos = &cur->pos.pos[i];
Expand Down Expand Up @@ -11502,7 +11502,7 @@ f_setmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
while (li != NULL)
{
int i = 0;
char_u buf[5];
char buf[30]; // use 30 to avoid compiler warning
dictitem_T *di;
char_u *group;
int priority;
Expand Down
2 changes: 1 addition & 1 deletion src/syntax.c
Original file line number Diff line number Diff line change
Expand Up @@ -10014,7 +10014,7 @@ highlight_changed(void)
char_u *end;
int id;
#ifdef USER_HIGHLIGHT
char_u userhl[10];
char_u userhl[30]; // use 30 to avoid compiler warning
# ifdef FEAT_STL_OPT
int id_S = -1;
int id_SNC = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1209,
/**/
1208,
/**/
Expand Down

0 comments on commit 5431589

Please sign in to comment.