From 502ff11663aa6039291a2ccf75bff0723cdcec70 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 23 Oct 2021 16:44:57 -0400 Subject: 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 vim/vim#3827) https://github.com/vim/vim/commit/63c0ccd2b68ce854f294e6f149cc700c7f543674 --- src/nvim/message.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/message.c b/src/nvim/message.c index b0b38875c7..80cc655c11 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -1376,7 +1376,7 @@ void msg_putchar(int c) void msg_putchar_attr(int c, int attr) { - char buf[MB_MAXBYTES + 1]; + char_u buf[MB_MAXBYTES + 1]; if (IS_SPECIAL(c)) { buf[0] = (char)K_SPECIAL; @@ -1384,9 +1384,9 @@ void msg_putchar_attr(int c, int attr) buf[2] = (char)K_THIRD(c); buf[3] = NUL; } else { - buf[utf_char2bytes(c, (char_u *)buf)] = NUL; + buf[utf_char2bytes(c, buf)] = NUL; } - msg_puts_attr(buf, attr); + msg_puts_attr((const char *)buf, attr); } void msg_outnum(long n) -- cgit