diff options
-rw-r--r-- | src/nvim/eval.c | 4 | ||||
-rw-r--r-- | src/nvim/syntax.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 10d6bbf714..c7d4e32739 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -10117,7 +10117,7 @@ static void f_getmatches(typval_T *argvars, typval_T *rettv, FunPtr fptr) // match added with matchaddpos() for (i = 0; i < MAXPOSMATCH; i++) { llpos_T *llpos; - char buf[6]; + char buf[30]; // use 30 to avoid compiler warning llpos = &cur->pos.pos[i]; if (llpos->lnum == 0) { @@ -14946,7 +14946,7 @@ static void f_setmatches(typval_T *argvars, typval_T *rettv, FunPtr fptr) // match from matchaddpos() for (i = 1; i < 9; i++) { - char buf[5]; + char buf[30]; // use 30 to avoid compiler warning snprintf(buf, sizeof(buf), "pos%d", i); dictitem_T *const pos_di = tv_dict_find(d, buf, -1); if (pos_di != NULL) { diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index ed95cdbebb..1b30161e94 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -7460,7 +7460,7 @@ void highlight_attr_set_all(void) void highlight_changed(void) { int id; - char_u userhl[10]; + char_u userhl[30]; // use 30 to avoid compiler warning int id_SNC = -1; int id_S = -1; int hlcnt; |