]> granicus.if.org Git - vim/commitdiff
patch 8.1.1209: clever compiler warns for buffer being too small v8.1.1209
authorBram Moolenaar <Bram@vim.org>
Fri, 26 Apr 2019 20:33:49 +0000 (22:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 26 Apr 2019 20:33:49 +0000 (22:33 +0200)
Problem:    Clever compiler warns for buffer being too small.
Solution:   Make the buffer bigger (even though it's not really needed).

src/evalfunc.c
src/syntax.c
src/version.c

index a4d6ebf64835adb09719ba9a4532b2d74cbcde35..228b71ad5c22f378c3ead2bf26efca4e4769ad07 100644 (file)
@@ -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];
@@ -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;
index df351a31a477bde6b6c1457eb4939fe0bd702bbb..7545165a0b26efccf01c2761bc1372e60d0773d8 100644 (file)
@@ -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;
index ccf68f8ecf532a07a46542197aaf570e697430f5..d024265aaf64775b2c64d80e6e669e90227a6b02 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1209,
 /**/
     1208,
 /**/