comparison src/evalfunc.c @ 26950:e682a58399c1 v8.2.4004

patch 8.2.4004: old compiler complains about struct init with variable Commit: https://github.com/vim/vim/commit/548911ee145cdd166f20e46aa720d1631e66f64e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 4 20:05:04 2022 +0000 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)
author Bram Moolenaar <Bram@vim.org>
date Tue, 04 Jan 2022 21:15:04 +0100
parents ccb9be1cdd71
children b34ddbca305c
comparison
equal deleted inserted replaced
26949:ef3fe9afe119 26950:e682a58399c1
522 expected = &t_string; 522 expected = &t_string;
523 else if (context->arg_types[0].type_curr->tt_type == VAR_BLOB) 523 else if (context->arg_types[0].type_curr->tt_type == VAR_BLOB)
524 expected = &t_number; 524 expected = &t_number;
525 if (expected != NULL) 525 if (expected != NULL)
526 { 526 {
527 type_T t_func_exp = {VAR_FUNC, -1, 0, TTFLAG_STATIC, 527 type_T t_func_exp = {VAR_FUNC, -1, 0, TTFLAG_STATIC, NULL, NULL};
528 expected, NULL}; 528
529 529 t_func_exp.tt_member = expected;
530 return check_arg_type(&t_func_exp, type, context); 530 return check_arg_type(&t_func_exp, type, context);
531 } 531 }
532 } 532 }
533 return OK; 533 return OK;
534 } 534 }