diff src/evalfunc.c @ 16409:39f0af6c71ed v8.1.1209

patch 8.1.1209: clever compiler warns for buffer being too small commit https://github.com/vim/vim/commit/5431589d25e73892fcf7ad1eaca53f742c1c9303 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 26 22:33:49 2019 +0200 patch 8.1.1209: clever compiler warns for buffer being too small Problem: Clever compiler warns for buffer being too small. Solution: Make the buffer bigger (even though it's not really needed).
author Bram Moolenaar <Bram@vim.org>
date Fri, 26 Apr 2019 22:45:04 +0200
parents 235a2b941498
children 5b5c5daf57de
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5460,7 +5460,7 @@ f_getmatches(typval_T *argvars UNUSED, t
 	    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, t
 	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;