vim-patch:8.0.0454: compiler warnings for "always true" comparison (#8431)

Problem:    Compiler warnings for comparing unsigned char with 256 always
            being true. (Manuel Ortega)
Solution:   Add type cast.
977d037336
This commit is contained in:
KunMing Xie
2018-05-25 05:32:32 +08:00
committed by Justin M. Keyes
parent c67139f8aa
commit d2c460638c
2 changed files with 4 additions and 3 deletions

View File

@@ -3454,7 +3454,8 @@ win_line (
}
// Found last space before word: check for line break.
if (wp->w_p_lbr && c0 == c && vim_isbreak(c) && !vim_isbreak(*ptr)) {
if (wp->w_p_lbr && c0 == c && vim_isbreak(c)
&& !vim_isbreak((int)(*ptr))) {
int mb_off = has_mbyte ? (*mb_head_off)(line, ptr - 1) : 0;
char_u *p = ptr - (mb_off + 1);
// TODO: is passing p for start of the line OK?