Skip to content

Commit 977d037

Browse files
committed
patch 8.0.0454: compiler warnings for "always true" comparison
Problem: Compiler warnings for comparing unsigned char with 256 always being true. (Manuel Ortega) Solution: Add type cast.
1 parent 025a6b7 commit 977d037

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/charset.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ win_lbr_chartabsize(
10901090
*/
10911091
if (wp->w_p_lbr
10921092
&& VIM_ISBREAK(c)
1093-
&& !VIM_ISBREAK(s[1])
1093+
&& !VIM_ISBREAK((int)s[1])
10941094
&& wp->w_p_wrap
10951095
# ifdef FEAT_WINDOWS
10961096
&& wp->w_width != 0
@@ -1120,7 +1120,7 @@ win_lbr_chartabsize(
11201120
if (!(c != NUL
11211121
&& (VIM_ISBREAK(c)
11221122
|| (!VIM_ISBREAK(c)
1123-
&& (col2 == col || !VIM_ISBREAK(*ps))))))
1123+
&& (col2 == col || !VIM_ISBREAK((int)*ps))))))
11241124
break;
11251125

11261126
col2 += win_chartabsize(wp, s, col2);

src/screen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4554,7 +4554,7 @@ win_line(
45544554
* Found last space before word: check for line break.
45554555
*/
45564556
if (wp->w_p_lbr && c0 == c
4557-
&& VIM_ISBREAK(c) && !VIM_ISBREAK(*ptr))
4557+
&& VIM_ISBREAK(c) && !VIM_ISBREAK((int)*ptr))
45584558
{
45594559
# ifdef FEAT_MBYTE
45604560
int mb_off = has_mbyte ? (*mb_head_off)(line, ptr - 1) : 0;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
454,
767769
/**/
768770
453,
769771
/**/

0 commit comments

Comments
 (0)