Patch 8.2.2367
Problem:    Test failures on some less often used systems.
Solution:   Adjust printf formats and types. (James McCoy, closes #7691)
Files:      src/errors.h, src/evalfunc.c, src/list.c, src/vim9execute.c


*** ../vim-8.2.2366/src/errors.h        2021-01-09 16:21:33.996353408 +0100
--- src/errors.h        2021-01-17 13:10:50.275324343 +0100
***************
*** 84,90 ****
  EXTERN char e_type_or_initialization_required[]
        INIT(= N_("E1022: Type or initialization required"));
  EXTERN char e_using_number_as_bool_nr[]
!       INIT(= N_("E1023: Using a Number as a Bool: %d"));
  EXTERN char e_using_number_as_string[]
        INIT(= N_("E1024: Using a Number as a String"));
  EXTERN char e_using_rcurly_outside_if_block_scope[]
--- 84,90 ----
  EXTERN char e_type_or_initialization_required[]
        INIT(= N_("E1022: Type or initialization required"));
  EXTERN char e_using_number_as_bool_nr[]
!       INIT(= N_("E1023: Using a Number as a Bool: %lld"));
  EXTERN char e_using_number_as_string[]
        INIT(= N_("E1024: Using a Number as a String"));
  EXTERN char e_using_rcurly_outside_if_block_scope[]
*** ../vim-8.2.2366/src/evalfunc.c      2021-01-16 16:52:14.656334823 +0100
--- src/evalfunc.c      2021-01-17 13:14:36.023209653 +0100
***************
*** 2567,2573 ****
  {
      char_u    *str;
      varnumber_T       idx;
!     int               countcc = FALSE;
      char_u    *p;
      int               len;
      int               (*ptr2len)(char_u *);
--- 2567,2573 ----
  {
      char_u    *str;
      varnumber_T       idx;
!     varnumber_T       countcc = FALSE;
      char_u    *p;
      int               len;
      int               (*ptr2len)(char_u *);
***************
*** 2588,2594 ****
        return;
  
      if (argvars[2].v_type != VAR_UNKNOWN)
!       countcc = (int)tv_get_bool(&argvars[2]);
      if (countcc < 0 || countcc > 1)
      {
        semsg(_(e_using_number_as_bool_nr), countcc);
--- 2588,2594 ----
        return;
  
      if (argvars[2].v_type != VAR_UNKNOWN)
!       countcc = tv_get_bool(&argvars[2]);
      if (countcc < 0 || countcc > 1)
      {
        semsg(_(e_using_number_as_bool_nr), countcc);
***************
*** 2848,2858 ****
      static void
  f_deepcopy(typval_T *argvars, typval_T *rettv)
  {
!     int               noref = 0;
      int               copyID;
  
      if (argvars[1].v_type != VAR_UNKNOWN)
!       noref = (int)tv_get_bool_chk(&argvars[1], NULL);
      if (noref < 0 || noref > 1)
        semsg(_(e_using_number_as_bool_nr), noref);
      else
--- 2848,2858 ----
      static void
  f_deepcopy(typval_T *argvars, typval_T *rettv)
  {
!     varnumber_T       noref = 0;
      int               copyID;
  
      if (argvars[1].v_type != VAR_UNKNOWN)
!       noref = tv_get_bool_chk(&argvars[1], NULL);
      if (noref < 0 || noref > 1)
        semsg(_(e_using_number_as_bool_nr), noref);
      else
***************
*** 9185,9196 ****
  f_strchars(typval_T *argvars, typval_T *rettv)
  {
      char_u            *s = tv_get_string(&argvars[0]);
!     int                       skipcc = FALSE;
      varnumber_T               len = 0;
      int                       (*func_mb_ptr2char_adv)(char_u **pp);
  
      if (argvars[1].v_type != VAR_UNKNOWN)
!       skipcc = (int)tv_get_bool(&argvars[1]);
      if (skipcc < 0 || skipcc > 1)
        semsg(_(e_using_number_as_bool_nr), skipcc);
      else
--- 9185,9196 ----
  f_strchars(typval_T *argvars, typval_T *rettv)
  {
      char_u            *s = tv_get_string(&argvars[0]);
!     varnumber_T               skipcc = FALSE;
      varnumber_T               len = 0;
      int                       (*func_mb_ptr2char_adv)(char_u **pp);
  
      if (argvars[1].v_type != VAR_UNKNOWN)
!       skipcc = tv_get_bool(&argvars[1]);
      if (skipcc < 0 || skipcc > 1)
        semsg(_(e_using_number_as_bool_nr), skipcc);
      else
*** ../vim-8.2.2366/src/list.c  2021-01-16 19:01:48.944919906 +0100
--- src/list.c  2021-01-17 13:10:50.275324343 +0100
***************
*** 925,931 ****
        if (!range)
        {
            if (verbose)
!               semsg(_(e_listidx), n1_arg);
            return FAIL;
        }
        n1 = n1 < 0 ? 0 : len;
--- 925,931 ----
        if (!range)
        {
            if (verbose)
!               semsg(_(e_listidx), (long)n1_arg);
            return FAIL;
        }
        n1 = n1 < 0 ? 0 : len;
***************
*** 1452,1458 ****
      listitem_T        *item, *item2;
      listitem_T        *li;
      int               error = FALSE;
!     int               idx;
  
      if ((l = argvars[0].vval.v_list) == NULL
                             || value_check_lock(l->lv_lock, arg_errmsg, TRUE))
--- 1452,1458 ----
      listitem_T        *item, *item2;
      listitem_T        *li;
      int               error = FALSE;
!     long      idx;
  
      if ((l = argvars[0].vval.v_list) == NULL
                             || value_check_lock(l->lv_lock, arg_errmsg, TRUE))
***************
*** 1475,1481 ****
        else
        {
            // Remove range of items, return list with values.
!           int end = (long)tv_get_number_chk(&argvars[2], &error);
  
            if (error)
                ;               // type error: do nothing
--- 1475,1481 ----
        else
        {
            // Remove range of items, return list with values.
!           long end = (long)tv_get_number_chk(&argvars[2], &error);
  
            if (error)
                ;               // type error: do nothing
*** ../vim-8.2.2366/src/vim9execute.c   2021-01-15 18:04:40.098419947 +0100
--- src/vim9execute.c   2021-01-17 13:18:06.055005504 +0100
***************
*** 1935,1942 ****
  
                    if (status == OK && dest_type == VAR_LIST)
                    {
!                       varnumber_T     lidx = tv_idx->vval.v_number;
!                       list_T          *list = tv_dest->vval.v_list;
  
                        if (list == NULL)
                        {
--- 1935,1942 ----
  
                    if (status == OK && dest_type == VAR_LIST)
                    {
!                       long        lidx = (long)tv_idx->vval.v_number;
!                       list_T      *list = tv_dest->vval.v_list;
  
                        if (list == NULL)
                        {
***************
*** 2121,2127 ****
                        else
                        {
                            list_T      *l = tv_dest->vval.v_list;
!                           varnumber_T n = tv_idx->vval.v_number;
                            listitem_T  *li = NULL;
  
                            li = list_find(l, n);
--- 2121,2127 ----
                        else
                        {
                            list_T      *l = tv_dest->vval.v_list;
!                           long        n = (long)tv_idx->vval.v_number;
                            listitem_T  *li = NULL;
  
                            li = list_find(l, n);
*** ../vim-8.2.2366/src/version.c       2021-01-16 20:20:59.650487081 +0100
--- src/version.c       2021-01-17 13:12:33.275226758 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2367,
  /**/

-- 
Keep America beautiful.  Swallow your beer cans.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202101171221.10HCLm1i566928%40masaka.moolenaar.net.

Raspunde prin e-mail lui