From c847c12cddcd3943f6a23235dd2f749edc72c997 Mon Sep 17 00:00:00 2001 From: John Marriott Date: Sun, 24 Nov 2024 14:09:40 +0100 Subject: [PATCH] patch 9.1.0884: gcc warns about uninitialized variable Problem: gcc warns about uninitialized variable in vim_strnicmp_asc() Solution: initialize variable to 1 (John Marriott) closes: #16108 Signed-off-by: John Marriott Signed-off-by: Christian Brabandt --- src/strings.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/strings.c b/src/strings.c index a586d8a370..cd75bc371d 100644 --- a/src/strings.c +++ b/src/strings.c @@ -597,7 +597,7 @@ vim_strnicmp(char *s1, char *s2, size_t len) int vim_strnicmp_asc(char *s1, char *s2, size_t len) { - int i; + int i = 0; int save_cmp_flags = cmp_flags; cmp_flags |= CMP_KEEPASCII; // compare by ASCII value, ignoring locale diff --git a/src/version.c b/src/version.c index 6f01f781be..f81cf12bee 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 */ +/**/ + 884, /**/ 883, /**/