Skip to content

Commit

Permalink
patch 8.2.4004: old compiler complains about struct init with variable
Browse files Browse the repository at this point in the history
Problem:    Old compiler complains about struct init with variable.
Solution:   Set the struct member later. (John Marriott)
  • Loading branch information
brammool committed Jan 4, 2022
1 parent d88be5b commit 548911e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/evalfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4004,
/**/
4003,
/**/
Expand Down

0 comments on commit 548911e

Please sign in to comment.