vim-patch:8.1.1383: warning for size_t/int mixup (#10694)

Problem:    Warning for size_t/int mixup.
Solution:   Change type. (Mike Williams)
d33a764123
This commit is contained in:
Jan Edmund Lazo 2019-08-04 21:35:46 -04:00 committed by Justin M. Keyes
parent 45c34bd84a
commit 6871445dfe

View File

@ -1130,7 +1130,7 @@ int do_search(
&& !cmd_silent && msg_silent == 0) {
char_u *trunc;
char_u off_buf[40];
int off_len = 0;
size_t off_len = 0;
// Compute msg_row early.
msg_start();
@ -1170,10 +1170,10 @@ int do_search(
len = 0; // adjusted below
} else if (msg_scrolled != 0) {
// Use all the columns.
len = (int)(Rows - msg_row) * Columns - 1;
len = (Rows - msg_row) * Columns - 1;
} else {
// Use up to 'showcmd' column.
len = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
len = (Rows - msg_row - 1) * Columns + sc_col - 1;
}
if (len < STRLEN(p) + off_len + SEARCH_STAT_BUF_LEN + 3) {
len = STRLEN(p) + off_len + SEARCH_STAT_BUF_LEN + 3;
@ -1183,7 +1183,7 @@ int do_search(
len = STRLEN(p) + off_len + 3;
}
msgbuf = xmalloc((int)len);
msgbuf = xmalloc(len);
{
memset(msgbuf, ' ', len);
msgbuf[0] = dirc;