]> granicus.if.org Git - vim/commitdiff
patch 8.2.1728: compiler warning for using uninitialized variable v8.2.1728
authorBram Moolenaar <Bram@vim.org>
Tue, 22 Sep 2020 20:08:32 +0000 (22:08 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 22 Sep 2020 20:08:32 +0000 (22:08 +0200)
Problem:    Compiler warning for using uninitialized variable. (John Marriott)
Solution:   Initialize "neighbor".

src/search.c
src/version.c

index 59b46e54d860aac201768a3db84843235b9ed2fe..badf7937184583b41d57e282bfac74ed1312a331 100644 (file)
@@ -4293,7 +4293,7 @@ fuzzy_match_compute_score(
        if (currIdx > 0)
        {
            // Camel case
-           int neighbor;
+           int neighbor = ' ';
            int curr;
            int neighborSeparator;
 
index cafc31d325a066d843b2f5313e7e431d599b80b5..a9852e94e330765774db3a0a82654fec772e6f97 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1728,
 /**/
     1727,
 /**/