summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-24 13:22:22 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-24 13:22:22 +0200
commite2ad826f431b2f8dd1b235c219282cc3961f7188 (patch)
tree8902f3be38d3a8088ece4b3dd334e5d72f899efd
parent984f031fb02fe301a8dbf8a35b871c9f60b8f61e (diff)
patch 8.1.1376: warnings for size_t/int mixupsv8.1.1376
Problem: Warnings for size_t/int mixups. Solution: Change types, add type casts. (Mike Williams)
-rw-r--r--src/search.c2
-rw-r--r--src/textprop.c8
-rw-r--r--src/version.c2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/search.c b/src/search.c
index 2bcbf0ae49..e57c101d72 100644
--- a/src/search.c
+++ b/src/search.c
@@ -4990,7 +4990,7 @@ search_stat(
if (cur > 0)
{
char t[SEARCH_STAT_BUF_LEN] = "";
- int len;
+ size_t len;
#ifdef FEAT_RIGHTLEFT
if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
diff --git a/src/textprop.c b/src/textprop.c
index 15ae4945b9..66ad694454 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1203,7 +1203,7 @@ join_prop_lines(
size_t oldproplen;
char_u *props;
int i;
- int len;
+ size_t len;
char_u *line;
size_t l;
@@ -1218,8 +1218,8 @@ join_prop_lines(
// get existing properties of the joined line
oldproplen = get_text_props(curbuf, lnum, &props, FALSE);
- len = (int)STRLEN(newp) + 1;
- line = alloc(len + (oldproplen + proplen) * (int)sizeof(textprop_T));
+ len = STRLEN(newp) + 1;
+ line = alloc((int)(len + (oldproplen + proplen) * sizeof(textprop_T)));
if (line == NULL)
return;
mch_memmove(line, newp, len);
@@ -1236,7 +1236,7 @@ join_prop_lines(
vim_free(prop_lines[i]);
}
- ml_replace_len(lnum, line, len, TRUE, FALSE);
+ ml_replace_len(lnum, line, (colnr_T)len, TRUE, FALSE);
vim_free(newp);
vim_free(prop_lines);
vim_free(prop_lengths);
diff --git a/src/version.c b/src/version.c
index 0fd12fe432..26c407195c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1376,
+/**/
1375,
/**/
1374,