]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1266: MS-Windows: type conversion warnings v9.1.1266
authorYegappan Lakshmanan <yegappan@yahoo.com>
Tue, 1 Apr 2025 18:38:37 +0000 (20:38 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 1 Apr 2025 18:38:37 +0000 (20:38 +0200)
Problem:  MS-Windows: type conversion warnings
Solution: cast the variables (Yegappan Lakshmanan)

closes: #17027

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/change.c
src/edit.c
src/findfile.c
src/insexpand.c
src/popupmenu.c
src/version.c

index 5cddf9b340435a2bbb9ddf87ceb3312e3225d676..c48d2549159ad9a300fff643c9b1b18096d49a7b 100644 (file)
@@ -1203,8 +1203,8 @@ ins_str(char_u *s, size_t slen)
     mch_memmove(newp + col, s, slen);
     mch_memmove(newp + col + slen, oldp + col, (size_t)(oldlen - col + 1));
     ml_replace(lnum, newp, FALSE);
-    inserted_bytes(lnum, col, slen);
-    curwin->w_cursor.col += slen;
+    inserted_bytes(lnum, col, (int)slen);
+    curwin->w_cursor.col += (colnr_T)slen;
 }
 
 /*
index 3fa95cdb05ff981aaee2f6831c99b2594a97f7eb..53428e0fbb1d774b4629cd7e80de3e0e68a15b5b 100644 (file)
@@ -2962,7 +2962,7 @@ stuff_inserted(
 
     do
     {
-       stuffReadbuffLen(insert.string, insert.length);
+       stuffReadbuffLen(insert.string, (long)insert.length);
        // a trailing "0" is inserted as "<C-V>048", "^" as "<C-V>^"
        switch (last)
        {
@@ -5468,7 +5468,7 @@ do_insert_char_pre(int c)
 
     // Lock the text to avoid weird things from happening.
     ++textlock;
-    set_vim_var_string(VV_CHAR, buf, buflen);  // set v:char
+    set_vim_var_string(VV_CHAR, buf, (int)buflen);  // set v:char
 
     res = NULL;
     if (ins_apply_autocmds(EVENT_INSERTCHARPRE))
index 2bd1e7eb997a5febb208025d5bf768f19aade489..fd2d69f29840455188f537d6a3980b438f6e2d6c 100644 (file)
@@ -1166,7 +1166,8 @@ vim_findfile(void *search_ctx_arg)
                            if (*suf == NUL)
                                break;
                            file_path.length = len + copy_option_part(&suf,
-                                 file_path.string + len, MAXPATHL - len, ",");
+                                 file_path.string + len,
+                                 (int)(MAXPATHL - len), ",");
                        }
                    }
                }
index 41aa3f9990187ddec392f0e2779952b18929b69a..3c81749c6a119246c186dd17cc5e3c9fc8cb4a63 100644 (file)
@@ -1797,7 +1797,7 @@ ins_compl_files(
     if (in_fuzzy_collect)
     {
        leader = ins_compl_leader();
-       leader_len = ins_compl_leader_len();
+       leader_len = (int)ins_compl_leader_len();
     }
 
     for (i = 0; i < count && !got_int && !compl_interrupted; i++)
@@ -4642,7 +4642,7 @@ ins_compl_delete(void)
     int        has_preinsert = ins_compl_preinsert_effect();
     if (has_preinsert)
     {
-       col += ins_compl_leader_len();
+       col += (int)ins_compl_leader_len();
        curwin->w_cursor.col = compl_ins_end_col;
     }
 
index a7c20c101b22e2b51fa39c130e660e6835066f93..294823bafeaf87734efe7b9f9a50418c1b6e5282 100644 (file)
@@ -478,7 +478,7 @@ pum_compute_text_attrs(char_u *text, hlf_T hlf, int user_hlattr)
        else
        {
            if (matched_len < 0 && MB_STRNICMP(ptr, leader, leader_len) == 0)
-               matched_len = leader_len;
+               matched_len = (int)leader_len;
            if (matched_len > 0)
            {
                new_attr = highlight_attr[is_select ? HLF_PMSI : HLF_PMNI];
@@ -765,7 +765,7 @@ pum_redraw(void)
                                                MB_PTR_ADV(orig_rt);
                                                last_char = orig_rt;
                                            }
-                                           kept_len = STRLEN(last_char);
+                                           kept_len = (int)STRLEN(last_char);
                                            new_str = alloc(ellipsis_width + over_cell + kept_len + 1);
                                            if (!new_str)
                                                return;
index 50632747be980d224a18cb5c70618258d60866d9..c90c7b56e9bedf9ebf9495de530272fe5942e90c 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1266,
 /**/
     1265,
 /**/