]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1699: compile warning for xdiff/xutils on MS-Windows v9.0.1699
authorMike Williams <mikew@globalgraphics.com>
Sat, 12 Aug 2023 18:47:43 +0000 (20:47 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 12 Aug 2023 18:50:55 +0000 (20:50 +0200)
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 <cb@256bit.org>
Co-authored-by: Mike Williams <mikew@globalgraphics.com>
src/version.c
src/xdiff/xutils.c

index 16ebc614fc7e9d14cbc83810c28cc47b6a3a8d4d..b09052c1d76a7183db6c8e1790958727bba95ff5 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1699,
 /**/
     1698,
 /**/
index a4370e610b8924f1d41fdee295e6473fc7efe3f5..fde0afb480142c5cbe612be13df8a1a0b9464ff7 100644 (file)
@@ -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;