patch 9.0.1699: compile warning for xdiff/xutils on MS-Windows

Commit: 
https://github.com/vim/vim/commit/6c313bbb043745a60a7ee30a78edb907260b764a
Author: Mike Williams <[email protected]>
Date:   Sat Aug 12 20:47:43 2023 +0200

    patch 9.0.1699: compile warning for xdiff/xutils on MS-Windows
    
    Problem: compile warning for xdiff/xutils on MS-Windows
    Solution: add explicit type cast from size_t to long
    
    closes: #12531
    
    Signed-off-by: Christian Brabandt <[email protected]>
    Co-authored-by: Mike Williams <[email protected]>

diff --git a/src/version.c b/src/version.c
index 16ebc614f..b09052c1d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1699,
 /**/
     1698,
 /**/
diff --git a/src/xdiff/xutils.c b/src/xdiff/xutils.c
index a4370e610..fde0afb48 100644
--- a/src/xdiff/xutils.c
+++ b/src/xdiff/xutils.c
@@ -442,7 +442,7 @@ void* xdl_alloc_grow_helper(void *p, long nr, long *alloc, 
size_t size)
        if (SIZE_MAX / size >= n)
                tmp = xdl_realloc(p, n * size);
        if (tmp) {
-               *alloc = n;
+               *alloc = (long)n;
        } else {
                xdl_free(p);
                *alloc = 0;

-- 
-- 
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/E1qUtqH-00GYaG-T7%40256bit.org.

Raspunde prin e-mail lui