0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.2367: test failures on some less often used systems

Problem:    Test failures on some less often used systems.
Solution:   Adjust printf formats and types. (James McCoy, closes #7691)
This commit is contained in:
Bram Moolenaar
2021-01-17 13:21:20 +01:00
parent e2edc2ed4a
commit 239f8d9326
5 changed files with 15 additions and 13 deletions

View File

@@ -84,7 +84,7 @@ EXTERN char e_const_requires_a_value[]
EXTERN char e_type_or_initialization_required[] EXTERN char e_type_or_initialization_required[]
INIT(= N_("E1022: Type or initialization required")); INIT(= N_("E1022: Type or initialization required"));
EXTERN char e_using_number_as_bool_nr[] EXTERN char e_using_number_as_bool_nr[]
INIT(= N_("E1023: Using a Number as a Bool: %d")); INIT(= N_("E1023: Using a Number as a Bool: %lld"));
EXTERN char e_using_number_as_string[] EXTERN char e_using_number_as_string[]
INIT(= N_("E1024: Using a Number as a String")); INIT(= N_("E1024: Using a Number as a String"));
EXTERN char e_using_rcurly_outside_if_block_scope[] EXTERN char e_using_rcurly_outside_if_block_scope[]

View File

@@ -2567,7 +2567,7 @@ f_charidx(typval_T *argvars, typval_T *rettv)
{ {
char_u *str; char_u *str;
varnumber_T idx; varnumber_T idx;
int countcc = FALSE; varnumber_T countcc = FALSE;
char_u *p; char_u *p;
int len; int len;
int (*ptr2len)(char_u *); int (*ptr2len)(char_u *);
@@ -2588,7 +2588,7 @@ f_charidx(typval_T *argvars, typval_T *rettv)
return; return;
if (argvars[2].v_type != VAR_UNKNOWN) if (argvars[2].v_type != VAR_UNKNOWN)
countcc = (int)tv_get_bool(&argvars[2]); countcc = tv_get_bool(&argvars[2]);
if (countcc < 0 || countcc > 1) if (countcc < 0 || countcc > 1)
{ {
semsg(_(e_using_number_as_bool_nr), countcc); semsg(_(e_using_number_as_bool_nr), countcc);
@@ -2848,11 +2848,11 @@ f_debugbreak(typval_T *argvars, typval_T *rettv)
static void static void
f_deepcopy(typval_T *argvars, typval_T *rettv) f_deepcopy(typval_T *argvars, typval_T *rettv)
{ {
int noref = 0; varnumber_T noref = 0;
int copyID; int copyID;
if (argvars[1].v_type != VAR_UNKNOWN) if (argvars[1].v_type != VAR_UNKNOWN)
noref = (int)tv_get_bool_chk(&argvars[1], NULL); noref = tv_get_bool_chk(&argvars[1], NULL);
if (noref < 0 || noref > 1) if (noref < 0 || noref > 1)
semsg(_(e_using_number_as_bool_nr), noref); semsg(_(e_using_number_as_bool_nr), noref);
else else
@@ -9185,12 +9185,12 @@ f_strlen(typval_T *argvars, typval_T *rettv)
f_strchars(typval_T *argvars, typval_T *rettv) f_strchars(typval_T *argvars, typval_T *rettv)
{ {
char_u *s = tv_get_string(&argvars[0]); char_u *s = tv_get_string(&argvars[0]);
int skipcc = FALSE; varnumber_T skipcc = FALSE;
varnumber_T len = 0; varnumber_T len = 0;
int (*func_mb_ptr2char_adv)(char_u **pp); int (*func_mb_ptr2char_adv)(char_u **pp);
if (argvars[1].v_type != VAR_UNKNOWN) if (argvars[1].v_type != VAR_UNKNOWN)
skipcc = (int)tv_get_bool(&argvars[1]); skipcc = tv_get_bool(&argvars[1]);
if (skipcc < 0 || skipcc > 1) if (skipcc < 0 || skipcc > 1)
semsg(_(e_using_number_as_bool_nr), skipcc); semsg(_(e_using_number_as_bool_nr), skipcc);
else else

View File

@@ -925,7 +925,7 @@ list_slice_or_index(
if (!range) if (!range)
{ {
if (verbose) if (verbose)
semsg(_(e_listidx), n1_arg); semsg(_(e_listidx), (long)n1_arg);
return FAIL; return FAIL;
} }
n1 = n1 < 0 ? 0 : len; n1 = n1 < 0 ? 0 : len;
@@ -1452,7 +1452,7 @@ list_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
listitem_T *item, *item2; listitem_T *item, *item2;
listitem_T *li; listitem_T *li;
int error = FALSE; int error = FALSE;
int idx; long idx;
if ((l = argvars[0].vval.v_list) == NULL if ((l = argvars[0].vval.v_list) == NULL
|| value_check_lock(l->lv_lock, arg_errmsg, TRUE)) || value_check_lock(l->lv_lock, arg_errmsg, TRUE))
@@ -1475,7 +1475,7 @@ list_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
else else
{ {
// Remove range of items, return list with values. // Remove range of items, return list with values.
int end = (long)tv_get_number_chk(&argvars[2], &error); long end = (long)tv_get_number_chk(&argvars[2], &error);
if (error) if (error)
; // type error: do nothing ; // type error: do nothing

View File

@@ -750,6 +750,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 */
/**/
2367,
/**/ /**/
2366, 2366,
/**/ /**/

View File

@@ -1935,8 +1935,8 @@ call_def_function(
if (status == OK && dest_type == VAR_LIST) if (status == OK && dest_type == VAR_LIST)
{ {
varnumber_T lidx = tv_idx->vval.v_number; long lidx = (long)tv_idx->vval.v_number;
list_T *list = tv_dest->vval.v_list; list_T *list = tv_dest->vval.v_list;
if (list == NULL) if (list == NULL)
{ {
@@ -2121,7 +2121,7 @@ call_def_function(
else else
{ {
list_T *l = tv_dest->vval.v_list; list_T *l = tv_dest->vval.v_list;
varnumber_T n = tv_idx->vval.v_number; long n = (long)tv_idx->vval.v_number;
listitem_T *li = NULL; listitem_T *li = NULL;
li = list_find(l, n); li = list_find(l, n);