Commit: patch 9.0.2175: Compiler warning for uninitialized var

6 views
Skip to first unread message

Christian Brabandt

unread,
Dec 18, 2023, 3:15:08 AM12/18/23
to vim...@googlegroups.com
patch 9.0.2175: Compiler warning for uninitialized var

Commit: https://github.com/vim/vim/commit/38ce1a7ac8da8ac0a8b58a1087f56e62e6fdfaa4
Author: Yegappan Lakshmanan <yega...@yahoo.com>
Date: Mon Dec 18 08:58:29 2023 +0100

patch 9.0.2175: Compiler warning for uninitialized var

Problem: Compiler warning for uninitialized var
Solution: initialize variable to NULL

closes: #13711

Signed-off-by: Yegappan Lakshmanan <yega...@yahoo.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/version.c b/src/version.c
index 50660311d..78fb3e01f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2175,
/**/
2174,
/**/
diff --git a/src/vim9cmds.c b/src/vim9cmds.c
index a276d5323..ad245b9c8 100644
--- a/src/vim9cmds.c
+++ b/src/vim9cmds.c
@@ -2000,7 +2000,7 @@ compile_defer(char_u *arg_start, cctx_T *cctx)
char_u *arg = arg_start;
int argcount = 0;
int defer_var_idx;
- type_T *type;
+ type_T *type = NULL;
int func_idx;

// Get a funcref for the function name.
Reply all
Reply to author
Forward
0 new messages