forked from aniani/vim
patch 8.2.0515: some compilers cannot add to "void *"
Problem: Some compilers cannot add to "void *". Solution: Cast to "char *".
This commit is contained in:
@@ -738,6 +738,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 */
|
||||||
|
/**/
|
||||||
|
515,
|
||||||
/**/
|
/**/
|
||||||
514,
|
514,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -368,7 +368,8 @@ func_type_add_arg_types(
|
|||||||
functype->tt_args = ALLOC_CLEAR_MULT(type_T *, argcount);
|
functype->tt_args = ALLOC_CLEAR_MULT(type_T *, argcount);
|
||||||
if (functype->tt_args == NULL)
|
if (functype->tt_args == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
((type_T **)type_gap->ga_data)[type_gap->ga_len] = (void *)functype->tt_args;
|
((type_T **)type_gap->ga_data)[type_gap->ga_len] =
|
||||||
|
(void *)functype->tt_args;
|
||||||
++type_gap->ga_len;
|
++type_gap->ga_len;
|
||||||
|
|
||||||
functype->tt_argcount = argcount;
|
functype->tt_argcount = argcount;
|
||||||
@@ -1846,7 +1847,7 @@ type_name(type_T *type, char **tofree)
|
|||||||
|
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
{
|
{
|
||||||
STRCPY(ga.ga_data + ga.ga_len, ", ");
|
STRCPY((char *)ga.ga_data + ga.ga_len, ", ");
|
||||||
ga.ga_len += 2;
|
ga.ga_len += 2;
|
||||||
}
|
}
|
||||||
len = (int)STRLEN(arg_type);
|
len = (int)STRLEN(arg_type);
|
||||||
@@ -1856,13 +1857,13 @@ type_name(type_T *type, char **tofree)
|
|||||||
return "[unknown]";
|
return "[unknown]";
|
||||||
}
|
}
|
||||||
*tofree = ga.ga_data;
|
*tofree = ga.ga_data;
|
||||||
STRCPY(ga.ga_data + ga.ga_len, arg_type);
|
STRCPY((char *)ga.ga_data + ga.ga_len, arg_type);
|
||||||
ga.ga_len += len;
|
ga.ga_len += len;
|
||||||
vim_free(arg_free);
|
vim_free(arg_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type->tt_member == &t_void)
|
if (type->tt_member == &t_void)
|
||||||
STRCPY(ga.ga_data + ga.ga_len, ")");
|
STRCPY((char *)ga.ga_data + ga.ga_len, ")");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *ret_free;
|
char *ret_free;
|
||||||
@@ -1876,8 +1877,8 @@ type_name(type_T *type, char **tofree)
|
|||||||
return "[unknown]";
|
return "[unknown]";
|
||||||
}
|
}
|
||||||
*tofree = ga.ga_data;
|
*tofree = ga.ga_data;
|
||||||
STRCPY(ga.ga_data + ga.ga_len, "): ");
|
STRCPY((char *)ga.ga_data + ga.ga_len, "): ");
|
||||||
STRCPY(ga.ga_data + ga.ga_len + 3, ret_name);
|
STRCPY((char *)ga.ga_data + ga.ga_len + 3, ret_name);
|
||||||
vim_free(ret_free);
|
vim_free(ret_free);
|
||||||
}
|
}
|
||||||
return ga.ga_data;
|
return ga.ga_data;
|
||||||
|
Reference in New Issue
Block a user