To: vim_dev@googlegroups.com Subject: Patch 8.2.1906 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1906 Problem: Warning for signed/unsigned. Solution: Use size_t instead of int. (Mike Williams) Files: src/proto/usercmd.pro, src/usercmd.c, src/vim9execute.c *** ../vim-8.2.1905/src/proto/usercmd.pro 2020-10-24 23:08:34.711491620 +0200 --- src/proto/usercmd.pro 2020-10-26 18:44:14.841199534 +0100 *************** *** 15,20 **** void uc_clear(garray_T *gap); void ex_delcommand(exarg_T *eap); size_t add_win_cmd_modifers(char_u *buf, cmdmod_T *cmod, int *multi_mods); ! int produce_cmdmods(char_u *buf, cmdmod_T *cmod, int quote); void do_ucmd(exarg_T *eap); /* vim: set ft=c : */ --- 15,20 ---- void uc_clear(garray_T *gap); void ex_delcommand(exarg_T *eap); size_t add_win_cmd_modifers(char_u *buf, cmdmod_T *cmod, int *multi_mods); ! size_t produce_cmdmods(char_u *buf, cmdmod_T *cmod, int quote); void do_ucmd(exarg_T *eap); /* vim: set ft=c : */ *** ../vim-8.2.1905/src/usercmd.c 2020-10-24 23:08:34.711491620 +0200 --- src/usercmd.c 2020-10-26 18:44:14.841199534 +0100 *************** *** 1269,1278 **** * Generate text for the "cmod" command modifiers. * If "buf" is NULL just return the length. */ ! int produce_cmdmods(char_u *buf, cmdmod_T *cmod, int quote) { ! int result = 0; int multi_mods = 0; int i; typedef struct { --- 1269,1278 ---- * Generate text for the "cmod" command modifiers. * If "buf" is NULL just return the length. */ ! size_t produce_cmdmods(char_u *buf, cmdmod_T *cmod, int quote) { ! size_t result = 0; int multi_mods = 0; int i; typedef struct { *** ../vim-8.2.1905/src/vim9execute.c 2020-10-24 23:08:34.711491620 +0200 --- src/vim9execute.c 2020-10-26 18:46:12.344731347 +0100 *************** *** 3530,3536 **** case ISN_CMDMOD: { char_u *buf; ! int len = produce_cmdmods( NULL, iptr->isn_arg.cmdmod.cf_cmdmod, FALSE); buf = alloc(len + 1); --- 3530,3536 ---- case ISN_CMDMOD: { char_u *buf; ! size_t len = produce_cmdmods( NULL, iptr->isn_arg.cmdmod.cf_cmdmod, FALSE); buf = alloc(len + 1); *** ../vim-8.2.1905/src/version.c 2020-10-25 17:55:06.173001826 +0100 --- src/version.c 2020-10-26 18:46:22.060693924 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1906, /**/ -- All true wisdom is found on T-shirts. /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///