changeset 28990:84a6794a9320 v8.2.5017

patch 8.2.5017: gcc 12.1 warns for uninitialized variable Commit: https://github.com/vim/vim/commit/8be36eecdc6728021f9c384c2305f114e671ec32 Author: mityu <mityu.mail@gmail.com> Date: Wed May 25 17:29:46 2022 +0100 patch 8.2.5017: gcc 12.1 warns for uninitialized variable Problem: Gcc 12.1 warns for uninitialized variable. Solution: Initialize the variable. (closes https://github.com/vim/vim/issues/10476)
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 May 2022 18:30:02 +0200
parents 65b740512fbf
children 654c6cfe7086
files src/evalvars.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
 
--- 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,