]> granicus.if.org Git - vim/commitdiff
patch 8.0.1528: dead code found v8.0.1528
authorBram Moolenaar <Bram@vim.org>
Tue, 20 Feb 2018 20:44:45 +0000 (21:44 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 20 Feb 2018 20:44:45 +0000 (21:44 +0100)
Problem:    Dead code found.
Solution:   Remove the useless lines. (CodeAi, closes #2656)

src/screen.c
src/spell.c
src/syntax.c
src/version.c
src/window.c

index 97f69882bf3ac57dced627cc56f681c9a812f614..8b7a519c08006eaacc7d8fe874928eb00fbc46fe 100644 (file)
@@ -10182,7 +10182,7 @@ screen_del_lines(
 }
 
 /*
- * show the current mode and ruler
+ * Show the current mode and ruler.
  *
  * If clear_cmdline is TRUE, clear the rest of the cmdline.
  * If clear_cmdline is FALSE there may be a message there that needs to be
@@ -10291,7 +10291,6 @@ showmode(void)
                        msg_puts_attr(edit_submode_extra, sub_attr);
                    }
                }
-               length = 0;
            }
            else
 #endif
index 3c53d1d250ac3f08a90187d5e71b6f9131f25517..0e08e9e7b44acef9833542581f2b30d7a9ed304e 100644 (file)
@@ -2404,7 +2404,6 @@ did_set_spelllang(win_T *wp)
            {
                vim_strncpy(region_cp, p + 1, 2);
                mch_memmove(p, p + 3, len - (p - lang) - 2);
-               len -= 3;
                region = region_cp;
            }
            else
index e85dca76daf86c32874a9f00479da9e5f341eb72..fcffdbf8af84f94fde6b21ba8e037a95eb0f06cb 100644 (file)
@@ -6814,7 +6814,6 @@ syntime_report(void)
     MSG_PUTS("\n");
     for (idx = 0; idx < ga.ga_len && !got_int; ++idx)
     {
-       spp = &(SYN_ITEMS(curwin->w_s)[idx]);
        p = ((time_entry_T *)ga.ga_data) + idx;
 
        MSG_PUTS(profile_msg(&p->total));
index 5bd6ead3a6d2163f5f0c9a5b4a1d0d4e5a6103bd..52b447e3a63fad643c83ba777c6cbca02294ec1d 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1528,
 /**/
     1527,
 /**/
index 38e1591cceb5efd5f2adce62ef326fa7004c2b3e..40a4607d0f3c52fe9ca3d252535fbaa8d06eef84 100644 (file)
@@ -1899,7 +1899,6 @@ win_equal_rec(
 
        for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
        {
-           n = m = 0;
            wincount = 1;
            if (fr->fr_next == NULL)
                /* last frame gets all that remains (avoid roundoff error) */
@@ -2041,7 +2040,6 @@ win_equal_rec(
 
        for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
        {
-           n = m = 0;
            wincount = 1;
            if (fr->fr_next == NULL)
                /* last frame gets all that remains (avoid roundoff error) */