summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-18 22:22:39 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-18 22:22:39 +0200
commit16ec3c9be3fcdc38530bddb12978bc5a7b98c0f6 (patch)
tree57999ee7e27be33c2769278f7fb14faa3a7340d9
parentc1fb763184c8ae82300357867fa2070aa94366e9 (diff)
downloadvim-git-16ec3c9be3fcdc38530bddb12978bc5a7b98c0f6.tar.gz
patch 7.4.2067v7.4.2067
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.
-rw-r--r--src/quickfix.c11
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 3 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 3794e6ab0..fecc2c9eb 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -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);
diff --git a/src/version.c b/src/version.c
index 8f6134b5b..55a99be95 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2067,
+/**/
2066,
/**/
2065,