Skip to content

Commit 63c0ccd

Browse files
committed
patch 8.1.0783: compiler warning for signed/unsigned
Problem: Compiler warning for signed/unsigned. Solution: Add type cast. Change type of buffer. (Ozaki Kiichi, closes #3827)
1 parent 2d951a4 commit 63c0ccd

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ main_loop(
12881288
* string here. Don't reset keep_msg, msg_attr_keep() uses it
12891289
* to check for duplicates. */
12901290
p = keep_msg;
1291-
msg_attr(p, keep_msg_attr);
1291+
msg_attr((char *)p, keep_msg_attr);
12921292
vim_free(p);
12931293
}
12941294
if (need_fileinfo) /* show file info after redraw */

src/message.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,9 +1389,9 @@ msg_putchar(int c)
13891389
msg_putchar_attr(int c, int attr)
13901390
{
13911391
#ifdef FEAT_MBYTE
1392-
char buf[MB_MAXBYTES + 1];
1392+
char_u buf[MB_MAXBYTES + 1];
13931393
#else
1394-
char buf[4];
1394+
char_u buf[4];
13951395
#endif
13961396

13971397
if (IS_SPECIAL(c))
@@ -1404,13 +1404,13 @@ msg_putchar_attr(int c, int attr)
14041404
else
14051405
{
14061406
#ifdef FEAT_MBYTE
1407-
buf[(*mb_char2bytes)(c, (char_u *)buf)] = NUL;
1407+
buf[(*mb_char2bytes)(c, buf)] = NUL;
14081408
#else
14091409
buf[0] = c;
14101410
buf[1] = NUL;
14111411
#endif
14121412
}
1413-
msg_puts_attr(buf, attr);
1413+
msg_puts_attr((char *)buf, attr);
14141414
}
14151415

14161416
void

src/version.c

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

792792
static int included_patches[] =
793793
{ /* Add new patch number below this line */
794+
/**/
795+
783,
794796
/**/
795797
782,
796798
/**/

0 commit comments

Comments
 (0)