]> granicus.if.org Git - vim/commitdiff
patch 8.0.0454: compiler warnings for "always true" comparison v8.0.0454
authorBram Moolenaar <Bram@vim.org>
Sun, 12 Mar 2017 20:31:58 +0000 (21:31 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 12 Mar 2017 20:31:58 +0000 (21:31 +0100)
Problem:    Compiler warnings for comparing unsigned char with 256 always
            being true. (Manuel Ortega)
Solution:   Add type cast.

src/charset.c
src/screen.c
src/version.c

index 2091d233bccf3982da3fe99835015a2485e23236..29c587b5211839d31d30d9d17bc1849d40eaee2c 100644 (file)
@@ -1090,7 +1090,7 @@ win_lbr_chartabsize(
      */
     if (wp->w_p_lbr
            && VIM_ISBREAK(c)
-           && !VIM_ISBREAK(s[1])
+           && !VIM_ISBREAK((int)s[1])
            && wp->w_p_wrap
 # ifdef FEAT_WINDOWS
            && wp->w_width != 0
@@ -1120,7 +1120,7 @@ win_lbr_chartabsize(
            if (!(c != NUL
                    && (VIM_ISBREAK(c)
                        || (!VIM_ISBREAK(c)
-                           && (col2 == col || !VIM_ISBREAK(*ps))))))
+                           && (col2 == col || !VIM_ISBREAK((int)*ps))))))
                break;
 
            col2 += win_chartabsize(wp, s, col2);
index b4fff18d9ee20274909c58893c1d3e657468f7ae..206b50fc00fdd513a825d695ad9bc0733cec4b12 100644 (file)
@@ -4554,7 +4554,7 @@ win_line(
                 * Found last space before word: check for line break.
                 */
                if (wp->w_p_lbr && c0 == c
-                                     && VIM_ISBREAK(c) && !VIM_ISBREAK(*ptr))
+                                 && VIM_ISBREAK(c) && !VIM_ISBREAK((int)*ptr))
                {
 # ifdef FEAT_MBYTE
                    int mb_off = has_mbyte ? (*mb_head_off)(line, ptr - 1) : 0;
index 28c929429c8aef19bcb084712498c52175778e6c..2f9c3150d324a51618f8ef041ffc049b0e0040b3 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    454,
 /**/
     453,
 /**/