0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.2.2767: compiler warning for unused argument

Problem:    Compiler warning for unused argument.
Solution:   Remove the argument.
This commit is contained in:
Bram Moolenaar 2021-04-14 21:30:06 +02:00
parent b141926890
commit bd6406f15d
5 changed files with 6 additions and 5 deletions

View File

@ -340,7 +340,7 @@ blob_slice_or_index(
* Check if "n1"- is a valid index for a blobl with length "bloblen".
*/
int
check_blob_index(long bloblen, varnumber_T n1, int is_range, int quiet)
check_blob_index(long bloblen, varnumber_T n1, int quiet)
{
if (n1 < 0 || n1 > bloblen)
{

View File

@ -1175,8 +1175,7 @@ get_lval(
lp->ll_n1 = (long)tv_get_number(&var1);
clear_tv(&var1);
if (check_blob_index(bloblen, lp->ll_n1, lp->ll_range, quiet)
== FAIL)
if (check_blob_index(bloblen, lp->ll_n1, quiet) == FAIL)
{
clear_tv(&var2);
return NULL;

View File

@ -14,7 +14,7 @@ int write_blob(FILE *fd, blob_T *blob);
char_u *blob2string(blob_T *blob, char_u **tofree, char_u *numbuf);
blob_T *string2blob(char_u *str);
int blob_slice_or_index(blob_T *blob, int is_range, varnumber_T n1, varnumber_T n2, int exclusive, typval_T *rettv);
int check_blob_index(long bloblen, varnumber_T n1, int is_range, int quiet);
int check_blob_index(long bloblen, varnumber_T n1, int quiet);
int check_blob_range(long bloblen, varnumber_T n1, varnumber_T n2, int quiet);
int blob_set_range(blob_T *dest, long n1, long n2, typval_T *src);
void blob_remove(typval_T *argvars, typval_T *rettv);

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2767,
/**/
2766,
/**/

View File

@ -2282,7 +2282,7 @@ call_def_function(
long bloblen = blob_len(tv_dest->vval.v_blob);
if (check_blob_index(bloblen,
n1, TRUE, FALSE) == FAIL
n1, FALSE) == FAIL
|| check_blob_range(bloblen,
n1, n2, FALSE) == FAIL)
status = FAIL;