]> granicus.if.org Git - vim/commitdiff
patch 8.2.3636: Coverity warns for unreachable code v8.2.3636
authorBram Moolenaar <Bram@vim.org>
Sun, 21 Nov 2021 11:15:49 +0000 (11:15 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 21 Nov 2021 11:15:49 +0000 (11:15 +0000)
Problem:    Coverity warns for unreachable code.
Solution:   Remove unreachable else block.

src/gui_gtk_x11.c
src/version.c

index 40d771231679272bca9d7fe91d0487601e42cc5a..4e89c4e70c24ed4af89ec2ce887907fd28acdedd 100644 (file)
@@ -5604,7 +5604,7 @@ gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags)
                {
                    slen++; // ligature char by char
                }
-               else if (is_utf8)
+               else // is_utf8
                {
                    if ((*(cs + slen) & 0xC0) == 0x80)
                    {
@@ -5638,10 +5638,6 @@ gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags)
                        slen++;
                    }
                }
-               else
-               {
-                   slen++;
-               }
            }
            else
            {
index 1efddd81fdd9dc1634e6021b8980cb1118c93234..6169463cf92e34be281675449e0af248e325852b 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3636,
 /**/
     3635,
 /**/