]> granicus.if.org Git - vim/commitdiff
patch 8.1.0783: compiler warning for signed/unsigned v8.1.0783
authorBram Moolenaar <Bram@vim.org>
Sat, 19 Jan 2019 20:06:58 +0000 (21:06 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 19 Jan 2019 20:06:58 +0000 (21:06 +0100)
Problem:    Compiler warning for signed/unsigned.
Solution:   Add type cast.  Change type of buffer. (Ozaki Kiichi, closes #3827)

src/main.c
src/message.c
src/version.c

index 18be06cc82e7cbce87b93e665634df06eb07e824..2fafe9401f3b541c2545bf02a3456c7fb1d34cfb 100644 (file)
@@ -1288,7 +1288,7 @@ main_loop(
                 * string here. Don't reset keep_msg, msg_attr_keep() uses it
                 * to check for duplicates. */
                p = keep_msg;
-               msg_attr(p, keep_msg_attr);
+               msg_attr((char *)p, keep_msg_attr);
                vim_free(p);
            }
            if (need_fileinfo)          /* show file info after redraw */
index 448173c0b97159fc36df2cf08061115c706649c2..0c3b5324dc0909771ed35b395baafe2ea5208061 100644 (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
index 6f8f874421adef76fb89d53f509c2a3a41f0111e..11e4bb682f8eb7bc5edc04a701de5219e620ae42 100644 (file)
@@ -791,6 +791,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    783,
 /**/
     782,
 /**/