patch 8.2.1884: compiler warning for uninitialized variable
Problem: Compiler warning for uninitialized variable. (John Marriott)
Solution: Initialize with NULL.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 4113309..72dc557 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -331,6 +331,7 @@
/*
* Functions that return the return type of a builtin function.
+ * Note that "argtypes" is NULL if "argcount" is zero.
*/
static type_T *
ret_void(int argcount UNUSED, type_T **argtypes UNUSED)
@@ -1825,6 +1826,11 @@
return OK;
}
+/*
+ * Call the "f_retfunc" function to obtain the return type of function "idx".
+ * "argtypes" is the list of argument types or NULL when there are no
+ * arguments.
+ */
type_T *
internal_func_ret_type(int idx, int argcount, type_T **argtypes)
{
diff --git a/src/version.c b/src/version.c
index 720dc3a..56bf8f6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1884,
+/**/
1883,
/**/
1882,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 7ae47b3..58f4db9 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1460,7 +1460,7 @@
isn_T *isn;
garray_T *stack = &cctx->ctx_type_stack;
int argoff;
- type_T **argtypes;
+ type_T **argtypes = NULL;
RETURN_OK_IF_SKIP(cctx);
argoff = check_internal_func(func_idx, argcount);