aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2018-05-25 05:32:32 +0800
committerJustin M. Keyes <justinkz@gmail.com>2018-05-24 23:32:32 +0200
commitd2c460638c7dad1253c672e91d889003b79428bc (patch)
treee118a373955340c68d346de4f782c9f1df0aecde /src/nvim/charset.c
parentc67139f8aac54af9ea2095dd5028010910a588b3 (diff)
downloadrneovim-d2c460638c7dad1253c672e91d889003b79428bc.tar.gz
rneovim-d2c460638c7dad1253c672e91d889003b79428bc.tar.bz2
rneovim-d2c460638c7dad1253c672e91d889003b79428bc.zip
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. https://github.com/vim/vim/commit/977d03733601948ab334fec24d0da82bc18c57c3
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index 7d5f80c531..4f70bcc41a 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -1018,7 +1018,7 @@ int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *he
// needs a break here
if (wp->w_p_lbr
&& vim_isbreak(c)
- && !vim_isbreak(s[1])
+ && !vim_isbreak((int)s[1])
&& wp->w_p_wrap
&& (wp->w_width != 0)) {
// Count all characters from first non-blank after a blank up to next
@@ -1042,7 +1042,7 @@ int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *he
c = *s;
if (!(c != NUL
- && (vim_isbreak(c) || col2 == col || !vim_isbreak(*ps)))) {
+ && (vim_isbreak(c) || col2 == col || !vim_isbreak((int)(*ps))))) {
break;
}