patch 8.2.4004: old compiler complains about struct init with variable
Problem: Old compiler complains about struct init with variable.
Solution: Set the struct member later. (John Marriott)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 8cb2d75..bb8f83b 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -524,9 +524,9 @@
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 f657caa..a7ffa77 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4004,
+/**/
4003,
/**/
4002,