patch 7.4.1863
Problem: Compiler warnings on Win64.
Solution: Adjust types, add type casts. (Ken Takata)
diff --git a/src/if_perl.xs b/src/if_perl.xs
index aab7ade..a489994 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -1075,7 +1075,8 @@
{
size_t len = 0;
char * str_from = SvPV(sv, len);
- char_u *str_to = (char_u*)alloc(sizeof(char_u) * (len + 1));
+ char_u *str_to = (char_u*)alloc(
+ (unsigned)(sizeof(char_u) * (len + 1)));
if (str_to) {
str_to[len] = '\0';
@@ -1370,13 +1371,13 @@
char_u *str;
PerlIOVim * s = PerlIOSelf(f, PerlIOVim);
- str = vim_strnsave((char_u *)vbuf, count);
+ str = vim_strnsave((char_u *)vbuf, (int)count);
if (str == NULL)
return 0;
msg_split((char_u *)str, s->attr);
vim_free(str);
- return count;
+ return (SSize_t)count;
}
static PERLIO_FUNCS_DECL(PerlIO_Vim) = {