]> granicus.if.org Git - vim/commitdiff
patch 7.4.2067 v7.4.2067
authorBram Moolenaar <Bram@vim.org>
Mon, 18 Jul 2016 20:22:39 +0000 (22:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 18 Jul 2016 20:22:39 +0000 (22:22 +0200)
Problem:    Compiler warning for char/char_u conversion. (Tony Mechelynck)
            Inefficient code.
Solution:   Use more lines to fill with spaces. (Nikolai Pavlov) Add type cast.

src/quickfix.c
src/version.c

index 3794e6ab09aa92e55e81e57f1f24f881856530ff..fecc2c9eb05f1809b6151e6f6955ebc412469f04 100644 (file)
@@ -2593,9 +2593,14 @@ qf_msg(qf_info_T *qi, int which, char *lead)
 
     if (title != NULL)
     {
-       while (STRLEN(buf) < 34)
-           STRCAT(buf, " ");
-       vim_strcat(buf, title, IOSIZE);
+       size_t  len = STRLEN(buf);
+
+       if (len < 34)
+       {
+           vim_memset(buf + len, ' ', 34 - len);
+           buf[34] = NUL;
+       }
+       vim_strcat(buf, (char_u *)title, IOSIZE);
     }
     trunc_string(buf, buf, Columns - 1, IOSIZE);
     msg(buf);
index 8f6134b5be2b1519522e07c2cc192f9b85c3b731..55a99be954a258c0308fa141fbdc93d4d3584130 100644 (file)
@@ -758,6 +758,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2067,
 /**/
     2066,
 /**/