diff src/xdiff/xutils.c @ 32760:8eded585a4d5 v9.0.1699

patch 9.0.1699: compile warning for xdiff/xutils on MS-Windows Commit: https://github.com/vim/vim/commit/6c313bbb043745a60a7ee30a78edb907260b764a Author: Mike Williams <mikew@globalgraphics.com> 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 <cb@256bit.org> Co-authored-by: Mike Williams <mikew@globalgraphics.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Aug 2023 21:00:05 +0200
parents f84e5db372ea
children
line wrap: on
line diff
--- a/src/xdiff/xutils.c
+++ b/src/xdiff/xutils.c
@@ -442,7 +442,7 @@ void* xdl_alloc_grow_helper(void *p, lon
 	if (SIZE_MAX / size >= n)
 		tmp = xdl_realloc(p, n * size);
 	if (tmp) {
-		*alloc = n;
+		*alloc = (long)n;
 	} else {
 		xdl_free(p);
 		*alloc = 0;