patch 9.1.0957: MS-Windows: conversion warnings
Problem: MS-Windows: conversion warnings
Solution: add explicit type casts (Yegappan Lakshmanan)
closes: #16288
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/option.c b/src/option.c
index f069d0f..e4c52bd 100644
--- a/src/option.c
+++ b/src/option.c
@@ -193,7 +193,7 @@
itemlen = vim_snprintf((char *)item, itemsize, "%s%s*", p, (has_trailing_path_sep) ? "" : PATHSEPSTR);
if (find_dup_item(ga.ga_data, item, itemlen, options[opt_idx].flags) == NULL
- && ga_grow(&ga, itemseplen + itemlen + 1) == OK)
+ && ga_grow(&ga, (int)(itemseplen + itemlen + 1)) == OK)
{
ga.ga_len += vim_snprintf((char *)ga.ga_data + ga.ga_len,
itemseplen + itemlen + 1,
@@ -8415,7 +8415,7 @@
if (vim_getenv((char_u *)"MYVIMDIR", &dofree) == NULL)
{
size_t usedlen = 0;
- int len = 0;
+ size_t len = 0;
char_u *fbuf = NULL;
if (STRNCMP(gettail(fname), ".vimrc", 6) == 0)
@@ -8452,7 +8452,7 @@
}
#endif
else
- (void)modify_fname((char_u *)":h", FALSE, &usedlen, &p, &fbuf, &len);
+ (void)modify_fname((char_u *)":h", FALSE, &usedlen, &p, &fbuf, (int *)&len);
if (p != NULL)
{