diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-16 14:37:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-16 14:37:39 +0100 |
commit | 4efe73b478d3ba689078da502fd96f45204ff1f5 (patch) | |
tree | c205c34c6eae39caa184af7b7a076df3bdab65f7 /src/memline.c | |
parent | d80232be5428f9df889f4e977e24117e162de67a (diff) | |
download | vim-git-4efe73b478d3ba689078da502fd96f45204ff1f5.tar.gz |
patch 8.1.0601: a few compiler warningsv8.1.0601
Problem: A few compiler warnings.
Solution: Add type casts. (Mike Williams)
Diffstat (limited to 'src/memline.c')
-rw-r--r-- | src/memline.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/memline.c b/src/memline.c index 0eb31c3c5..eaa3b65ab 100644 --- a/src/memline.c +++ b/src/memline.c @@ -3146,7 +3146,7 @@ ml_replace(linenr_T lnum, char_u *line, int copy) 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 @@ ml_replace_len(linenr_T lnum, char_u *line_arg, colnr_T len_arg, int copy) 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; } } } |