diff src/message.c @ 15551:b069a878bbeb v8.1.0783

patch 8.1.0783: compiler warning for signed/unsigned commit https://github.com/vim/vim/commit/63c0ccd2b68ce854f294e6f149cc700c7f543674 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 19 21:06:58 2019 +0100 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 https://github.com/vim/vim/issues/3827)
author Bram Moolenaar <Bram@vim.org>
date Sat, 19 Jan 2019 21:15:05 +0100
parents dd725a8ab112
children d89c5b339c2a
line wrap: on
line diff
--- a/src/message.c
+++ b/src/message.c
@@ -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