Commit: patch 9.1.0545: MSVC conversion warning

5 views
Skip to first unread message

Christian Brabandt

unread,
Jul 8, 2024, 3:00:13 PM7/8/24
to vim...@googlegroups.com
patch 9.1.0545: MSVC conversion warning

Commit: https://github.com/vim/vim/commit/5285b3cd297826a8c90eb0537c20762f66c5ca4d
Author: Ernie Rael <err...@raelity.com>
Date: Mon Jul 8 20:42:45 2024 +0200

patch 9.1.0545: MSVC conversion warning

Problem: MSVC conversion warning (LemonBoy, after 9.1.0522)
Solution: Use size_t instead of int, fix style of casts
(Ernie Rael)

related: #15082
closes: #15187

Signed-off-by: Ernie Rael <err...@raelity.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/eval.c b/src/eval.c
index 049834650..beb913ffe 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6197,10 +6197,10 @@ object_tv2string(
else if (copyID != 0 && obj->obj_copyID == copyID
&& obj->obj_class->class_obj_member_count != 0)
{
- int n = 25 + strlen((char*)obj->obj_class->class_name);
+ size_t n = 25 + strlen((char *)obj->obj_class->class_name);
r = alloc(n);
if (r != NULL)
- (void)vim_snprintf((char*)r, n, "object of %s {...}",
+ (void)vim_snprintf((char *)r, n, "object of %s {...}",
obj->obj_class->class_name);
*tofree = r;
}
diff --git a/src/version.c b/src/version.c
index 536f840ad..59c9f976c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 545,
/**/
544,
/**/
Reply all
Reply to author
Forward
0 new messages