mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
patch 8.2.1299: compiler warning for using size_t for int and void pointer
Problem: Compiler warning for using size_t for int and void pointer. Solution: Add type casts.
This commit is contained in:
parent
cb4f69c2fd
commit
d3bb6a82a5
@ -157,18 +157,18 @@ estack_sfile(int is_sfile UNUSED)
|
|||||||
last_type = entry->es_type;
|
last_type = entry->es_type;
|
||||||
}
|
}
|
||||||
len += STRLEN(type_name);
|
len += STRLEN(type_name);
|
||||||
if (ga_grow(&ga, len) == FAIL)
|
if (ga_grow(&ga, (int)len) == FAIL)
|
||||||
break;
|
break;
|
||||||
if (idx == exestack.ga_len - 1 || entry->es_lnum == 0)
|
if (idx == exestack.ga_len - 1 || entry->es_lnum == 0)
|
||||||
// For the bottom entry: do not add the line number, it is used
|
// For the bottom entry: do not add the line number, it is used
|
||||||
// in <slnum>. Also leave it out when the number is not set.
|
// in <slnum>. Also leave it out when the number is not set.
|
||||||
vim_snprintf(ga.ga_data + ga.ga_len, len, "%s%s%s",
|
vim_snprintf((char *)ga.ga_data + ga.ga_len, len, "%s%s%s",
|
||||||
type_name, entry->es_name,
|
type_name, entry->es_name,
|
||||||
idx == exestack.ga_len - 1 ? "" : "..");
|
idx == exestack.ga_len - 1 ? "" : "..");
|
||||||
else
|
else
|
||||||
vim_snprintf(ga.ga_data + ga.ga_len, len, "%s%s[%ld]..",
|
vim_snprintf((char *)ga.ga_data + ga.ga_len, len, "%s%s[%ld]..",
|
||||||
type_name, entry->es_name, entry->es_lnum);
|
type_name, entry->es_name, entry->es_lnum);
|
||||||
ga.ga_len += STRLEN(ga.ga_data + ga.ga_len);
|
ga.ga_len += (int)STRLEN((char *)ga.ga_data + ga.ga_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1299,
|
||||||
/**/
|
/**/
|
||||||
1298,
|
1298,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user