patch 8.1.0601: a few compiler warnings
Problem: A few compiler warnings.
Solution: Add type casts. (Mike Williams)
diff --git a/src/GvimExt/gvimext.cpp b/src/GvimExt/gvimext.cpp
index 30b2ddd..b9d9d91 100644
--- a/src/GvimExt/gvimext.cpp
+++ b/src/GvimExt/gvimext.cpp
@@ -1084,7 +1084,6 @@
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
-theend:
free(cmdStrW);
return NOERROR;
diff --git a/src/memline.c b/src/memline.c
index 0eb31c3..eaa3b65 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -3146,7 +3146,7 @@
colnr_T len = -1;
if (line != NULL)
- len = STRLEN(line);
+ len = (colnr_T)STRLEN(line);
return ml_replace_len(lnum, line, len, copy);
}
@@ -3196,14 +3196,14 @@
size_t textproplen = curbuf->b_ml.ml_line_len - oldtextlen;
// Need to copy over text properties, stored after the text.
- newline = alloc(len + 1 + textproplen);
+ newline = alloc(len + 1 + (int)textproplen);
if (newline != NULL)
{
mch_memmove(newline, line, len + 1);
mch_memmove(newline + len + 1, curbuf->b_ml.ml_line_ptr + oldtextlen, textproplen);
vim_free(line);
line = newline;
- len += textproplen;
+ len += (colnr_T)textproplen;
}
}
}
diff --git a/src/textprop.c b/src/textprop.c
index 3e0207d..05df2e1 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -301,7 +301,7 @@
}
if (proplen > 0)
*props = text + textlen;
- return proplen / sizeof(textprop_T);
+ return (int)(proplen / sizeof(textprop_T));
}
static proptype_T *
@@ -393,7 +393,7 @@
buf->b_ml.ml_line_ptr = newtext;
buf->b_ml.ml_flags |= ML_LINE_DIRTY;
}
- buf->b_ml.ml_line_len = len;
+ buf->b_ml.ml_line_len = (int)len;
}
}
redraw_buf_later(buf, NOT_VALID);
@@ -423,8 +423,8 @@
{
char_u *text = ml_get_buf(buf, lnum, FALSE);
size_t textlen = STRLEN(text) + 1;
- int count = (buf->b_ml.ml_line_len - textlen)
- / sizeof(textprop_T);
+ int count = (int)((buf->b_ml.ml_line_len - textlen)
+ / sizeof(textprop_T));
int i;
textprop_T prop;
proptype_T *pt;
@@ -607,7 +607,7 @@
EMSG2(_("E969: Property type %s already defined"), name);
return;
}
- prop = (proptype_T *)alloc_clear(sizeof(proptype_T) + STRLEN(name));
+ prop = (proptype_T *)alloc_clear((int)(sizeof(proptype_T) + STRLEN(name)));
if (prop == NULL)
return;
STRCPY(prop->pt_name, name);
diff --git a/src/version.c b/src/version.c
index a485b28..5db1001 100644
--- a/src/version.c
+++ b/src/version.c
@@ -800,6 +800,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 601,
+/**/
600,
/**/
599,