mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 13:45:15 -07:00
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:
parent
45c34bd84a
commit
6871445dfe
@ -1130,7 +1130,7 @@ int do_search(
|
|||||||
&& !cmd_silent && msg_silent == 0) {
|
&& !cmd_silent && msg_silent == 0) {
|
||||||
char_u *trunc;
|
char_u *trunc;
|
||||||
char_u off_buf[40];
|
char_u off_buf[40];
|
||||||
int off_len = 0;
|
size_t off_len = 0;
|
||||||
|
|
||||||
// Compute msg_row early.
|
// Compute msg_row early.
|
||||||
msg_start();
|
msg_start();
|
||||||
@ -1170,10 +1170,10 @@ int do_search(
|
|||||||
len = 0; // adjusted below
|
len = 0; // adjusted below
|
||||||
} else if (msg_scrolled != 0) {
|
} else if (msg_scrolled != 0) {
|
||||||
// Use all the columns.
|
// Use all the columns.
|
||||||
len = (int)(Rows - msg_row) * Columns - 1;
|
len = (Rows - msg_row) * Columns - 1;
|
||||||
} else {
|
} else {
|
||||||
// Use up to 'showcmd' column.
|
// 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) {
|
if (len < STRLEN(p) + off_len + SEARCH_STAT_BUF_LEN + 3) {
|
||||||
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;
|
len = STRLEN(p) + off_len + 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
msgbuf = xmalloc((int)len);
|
msgbuf = xmalloc(len);
|
||||||
{
|
{
|
||||||
memset(msgbuf, ' ', len);
|
memset(msgbuf, ' ', len);
|
||||||
msgbuf[0] = dirc;
|
msgbuf[0] = dirc;
|
||||||
|
Loading…
Reference in New Issue
Block a user