]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1993: MS-Windows: compile error because of implicit type conversions v9.1.1993
authorChristian Brabandt <cb@256bit.org>
Wed, 17 Dec 2025 20:52:01 +0000 (21:52 +0100)
committerChristian Brabandt <cb@256bit.org>
Wed, 17 Dec 2025 20:52:01 +0000 (21:52 +0100)
Problem:  MS-Windows: compile error because of implicit size conversions
          (after v9.1.1983)
Solution: Change type casts

closes: #18946

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/scriptfile.c
src/version.c

index b98c4e2952c9b10ec42819e9f8ac4102e3a0a9d3..008818e0236412cc7c5fee908fe6785cbd4742d3 100644 (file)
@@ -189,6 +189,7 @@ estack_sfile(estack_arg_T which UNUSED)
        if (entry->es_name != NULL)
        {
            long        lnum = 0;
+           size_t      added = 0;
            string_T    type_name = {(char_u *)"", 0};
            string_T    class_name = {(char_u *)"", 0};
            string_T    es_name = {entry->es_name, STRLEN(entry->es_name)};
@@ -226,21 +227,29 @@ estack_sfile(estack_arg_T which UNUSED)
            ga_concat_len(&ga, type_name.string, type_name.length);
            // For class methods prepend "<class name>." to the function name.
            if (*class_name.string != NUL)
-               ga.ga_len += (int)vim_snprintf_safelen(
+           {
+               added = vim_snprintf_safelen(
                    (char *)ga.ga_data + ga.ga_len,
                    len - (size_t)ga.ga_len,
                    "<SNR>%d_%s.",
                    entry->es_info.ufunc->uf_script_ctx.sc_sid,
                    class_name.string);
+
+               ga.ga_len += (int)added;
+           }
            ga_concat_len(&ga, es_name.string, es_name.length);
            // For the bottom entry of <sfile>: do not add the line number, it is used in
            // <slnum>.  Also leave it out when the number is not set.
            if (lnum != 0)
-               ga.ga_len += (int)vim_snprintf_safelen(
+           {
+               added = vim_snprintf_safelen(
                    (char *)ga.ga_data + ga.ga_len,
                    len - (size_t)ga.ga_len,
                    "[%ld]",
                    lnum);
+
+               ga.ga_len += (int)added;
+           }
            if (idx != exestack.ga_len - 1)
                ga_concat_len(&ga, (char_u *)"..", 2);
        }
index 80384a0fb194aae870fd3643b4a0402dc48c4fa0..ac93ebec0eeb5622c468ff6b82dfc00e34aa62e5 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1993,
 /**/
     1992,
 /**/