Commit: patch 9.1.1333: Coverity: complains about unutilized variable

2 views
Skip to first unread message

Christian Brabandt

unread,
Apr 22, 2025, 2:15:13 PM4/22/25
to vim...@googlegroups.com
patch 9.1.1333: Coverity: complains about unutilized variable

Commit: https://github.com/vim/vim/commit/7dfc9e6121e85084fc428e915c717cbe0c8b2acd
Author: Christian Brabandt <c...@256bit.org>
Date: Tue Apr 22 20:01:04 2025 +0200

patch 9.1.1333: Coverity: complains about unutilized variable

Problem: Coverity: complains about unutilized variable
Solution: initialize typval properly
(author)

Fixes: Coverity issue: 1646573
tmp.v_lock is left unitialized
related: #17189

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

diff --git a/src/typval.c b/src/typval.c
index b9f8f1c16..db439cbd6 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -1305,6 +1305,7 @@ tv_stringify(typval_T *varp, char_u *buf)
{
typval_T tmp;

+ init_tv(&tmp);
f_string(varp, &tmp);
tv_get_string_buf(&tmp, buf);
clear_tv(varp);
diff --git a/src/version.c b/src/version.c
index 35e71ca71..cd58d6113 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 */
+/**/
+ 1333,
/**/
1332,
/**/
Reply all
Reply to author
Forward
0 new messages