summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormityu <mityu.mail@gmail.com>2022-05-25 17:29:46 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-25 17:29:46 +0100
commit8be36eecdc6728021f9c384c2305f114e671ec32 (patch)
tree7a382e8669ad5c0854868671068cfcf73a8440e8
parent2a585c85013be22f59f184d49612074fd9b115d7 (diff)
downloadvim-git-8be36eecdc6728021f9c384c2305f114e671ec32.tar.gz
patch 8.2.5017: gcc 12.1 warns for uninitialized variablev8.2.5017
Problem: Gcc 12.1 warns for uninitialized variable. Solution: Initialize the variable. (closes #10476)
-rw-r--r--src/evalvars.c2
-rw-r--r--src/version.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index e83c50dff..f7939cbb7 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -2023,7 +2023,7 @@ do_unlet(char_u *name, int forceit)
{
hashtab_T *ht;
hashitem_T *hi;
- char_u *varname;
+ char_u *varname = NULL; // init to shut up gcc
dict_T *d;
dictitem_T *di;
diff --git a/src/version.c b/src/version.c
index 250b73e7a..980ddff73 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 5017,
+/**/
5016,
/**/
5015,