Commit: patch 9.1.1302: Coverity warns about using uninitialized value

1 view
Skip to first unread message

Christian Brabandt

unread,
Apr 15, 2025, 12:15:25 PM4/15/25
to vim...@googlegroups.com
patch 9.1.1302: Coverity warns about using uninitialized value

Commit: https://github.com/vim/vim/commit/d2079cff48117b121cd4afcc91fc14a696bdb142
Author: Christian Brabandt <c...@256bit.org>
Date: Tue Apr 15 18:10:26 2025 +0200

patch 9.1.1302: Coverity warns about using uninitialized value

Problem: Coverity warns about using uninitialized value
(Coverity, Tony Mechelynck, after v9.1.1301)
Solution: initialize callback pointer to NULL

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/insexpand.c b/src/insexpand.c
index 4afb3d9a8..c0762da90 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -6427,7 +6427,7 @@ cpt_compl_refresh(void)
#ifdef FEAT_COMPL_FUNC
char_u *cpt;
char_u *p;
- callback_T *cb;
+ callback_T *cb = NULL;

// Make the completion list linear (non-cyclic)
ins_compl_make_linear();
diff --git a/src/version.c b/src/version.c
index 275838237..90ddf0bab 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 */
+/**/
+ 1302,
/**/
1301,
/**/
Reply all
Reply to author
Forward
0 new messages