changeset 22715:8968ed4ba4ba v8.2.1906

patch 8.2.1906: warning for signed/unsigned Commit: https://github.com/vim/vim/commit/a360dbe3b63bdca93bbf8cc431578a446e8ce14c Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 26 18:46:53 2020 +0100 patch 8.2.1906: warning for signed/unsigned Problem: Warning for signed/unsigned. Solution: Use size_t instead of int. (Mike Williams)
author Bram Moolenaar <Bram@vim.org>
date Mon, 26 Oct 2020 19:00:04 +0100
parents 3a5093628329
children 071666f3558b
files src/proto/usercmd.pro src/usercmd.c src/version.c src/vim9execute.c
diffstat 4 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/proto/usercmd.pro
+++ b/src/proto/usercmd.pro
@@ -15,6 +15,6 @@ void ex_comclear(exarg_T *eap);
 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);
+size_t produce_cmdmods(char_u *buf, cmdmod_T *cmod, int quote);
 void do_ucmd(exarg_T *eap);
 /* vim: set ft=c : */
--- a/src/usercmd.c
+++ b/src/usercmd.c
@@ -1269,10 +1269,10 @@ add_win_cmd_modifers(char_u *buf, cmdmod
  * Generate text for the "cmod" command modifiers.
  * If "buf" is NULL just return the length.
  */
-    int
+    size_t
 produce_cmdmods(char_u *buf, cmdmod_T *cmod, int quote)
 {
-    int	    result = 0;
+    size_t  result = 0;
     int	    multi_mods = 0;
     int	    i;
     typedef struct {
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1906,
+/**/
     1905,
 /**/
     1904,
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -3530,7 +3530,7 @@ ex_disassemble(exarg_T *eap)
 	    case ISN_CMDMOD:
 		{
 		    char_u  *buf;
-		    int	    len = produce_cmdmods(
+		    size_t  len = produce_cmdmods(
 				  NULL, iptr->isn_arg.cmdmod.cf_cmdmod, FALSE);
 
 		    buf = alloc(len + 1);