summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-04 20:05:04 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-04 20:05:04 +0000
commit548911ee145cdd166f20e46aa720d1631e66f64e (patch)
tree3d1b61e9230da9153da4297629f347f4c25e0cf5
parentd88be5be80f47826397d12ffc90150a443821f2b (diff)
downloadvim-git-548911ee145cdd166f20e46aa720d1631e66f64e.tar.gz
patch 8.2.4004: old compiler complains about struct init with variablev8.2.4004
Problem: Old compiler complains about struct init with variable. Solution: Set the struct member later. (John Marriott)
-rw-r--r--src/evalfunc.c4
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 8cb2d755d..bb8f83b97 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -524,9 +524,9 @@ arg_map_func(type_T *type, type_T *decl_type UNUSED, argcontext_T *context)
expected = &t_number;
if (expected != NULL)
{
- type_T t_func_exp = {VAR_FUNC, -1, 0, TTFLAG_STATIC,
- expected, NULL};
+ type_T t_func_exp = {VAR_FUNC, -1, 0, TTFLAG_STATIC, NULL, NULL};
+ t_func_exp.tt_member = expected;
return check_arg_type(&t_func_exp, type, context);
}
}
diff --git a/src/version.c b/src/version.c
index f657caa5e..a7ffa77b4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4004,
+/**/
4003,
/**/
4002,