Commit: patch 9.1.1481: gcc complains about uninitialized variable

2 views
Skip to first unread message

Christian Brabandt

unread,
Jun 25, 2025, 3:00:15 PM6/25/25
to vim...@googlegroups.com
patch 9.1.1481: gcc complains about uninitialized variable

Commit: https://github.com/vim/vim/commit/42d2c5e803cec6ec661217fa1ae630a2f7c463bc
Author: Christian Brabandt <c...@256bit.org>
Date: Wed Jun 25 20:54:11 2025 +0200

patch 9.1.1481: gcc complains about uninitialized variable

Problem: gcc complains about uninitialized variable
(Tony Mechelynck, after v9.1.1476)
Solution: initialize variable

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

diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index c4a86c90e..5d9b72213 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -656,7 +656,7 @@ ex_uniq(exarg_T *eap)
linenr_T count = eap->line2 - eap->line1 + 1;
char_u *p;
char_u *s;
- char_u save_c; // temporary character storage
+ char_u save_c = 0; // temporary character storage
int keep_only_unique = FALSE;
int keep_only_not_unique = eap->forceit ? TRUE : FALSE;
long deleted = 0;
diff --git a/src/version.c b/src/version.c
index 3b5a3da74..c7c66ec0b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -709,6 +709,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1481,
/**/
1480,
/**/
Reply all
Reply to author
Forward
0 new messages