1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2019-01-19 21:06:58 +01:00
parent 2d951a486e
commit 63c0ccd2b6
3 changed files with 7 additions and 5 deletions

View File

@@ -1389,9 +1389,9 @@ msg_putchar(int c)
msg_putchar_attr(int c, int attr)
{
#ifdef FEAT_MBYTE
char buf[MB_MAXBYTES + 1];
char_u buf[MB_MAXBYTES + 1];
#else
char buf[4];
char_u buf[4];
#endif
if (IS_SPECIAL(c))
@@ -1404,13 +1404,13 @@ msg_putchar_attr(int c, int attr)
else
{
#ifdef FEAT_MBYTE
buf[(*mb_char2bytes)(c, (char_u *)buf)] = NUL;
buf[(*mb_char2bytes)(c, buf)] = NUL;
#else
buf[0] = c;
buf[1] = NUL;
#endif
}
msg_puts_attr(buf, attr);
msg_puts_attr((char *)buf, attr);
}
void