Skip to content

Commit 16ec3c9

Browse files
committed
patch 7.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.
1 parent c1fb763 commit 16ec3c9

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/quickfix.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2593,9 +2593,14 @@ qf_msg(qf_info_T *qi, int which, char *lead)
25932593

25942594
if (title != NULL)
25952595
{
2596-
while (STRLEN(buf) < 34)
2597-
STRCAT(buf, " ");
2598-
vim_strcat(buf, title, IOSIZE);
2596+
size_t len = STRLEN(buf);
2597+
2598+
if (len < 34)
2599+
{
2600+
vim_memset(buf + len, ' ', 34 - len);
2601+
buf[34] = NUL;
2602+
}
2603+
vim_strcat(buf, (char_u *)title, IOSIZE);
25992604
}
26002605
trunc_string(buf, buf, Columns - 1, IOSIZE);
26012606
msg(buf);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,8 @@ static char *(features[]) =
758758

759759
static int included_patches[] =
760760
{ /* Add new patch number below this line */
761+
/**/
762+
2067,
761763
/**/
762764
2066,
763765
/**/

0 commit comments

Comments
 (0)