Mercurial > vim
diff src/textprop.c @ 15353:21580db06cf3 v8.1.0684
patch 8.1.0684: warnings from 64-bit compiler
commit https://github.com/vim/vim/commit/4b7214ea7834c72188f4a7b0b76b49b81fef7d27
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 3 21:55:32 2019 +0100
patch 8.1.0684: warnings from 64-bit compiler
Problem: Warnings from 64-bit compiler.
Solution: Add type casts. (Mike Williams)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 03 Jan 2019 22:00:06 +0100 |
parents | 6abee072b93c |
children | 73b153ed5af8 |
line wrap: on
line diff
--- a/src/textprop.c +++ b/src/textprop.c @@ -262,9 +262,9 @@ f_prop_add(typval_T *argvars, typval_T * if (lnum == end_lnum) length = end_col - col; else - length = textlen - col + 1; + length = (int)textlen - col + 1; if (length > (long)textlen) - length = textlen; // can include the end-of-line + length = (int)textlen; // can include the end-of-line if (length < 0) length = 0; // zero-width property @@ -972,7 +972,7 @@ adjust_prop_columns( if (dirty) { curbuf->b_ml.ml_flags |= ML_LINE_DIRTY; - curbuf->b_ml.ml_line_len = textlen + wi * sizeof(textprop_T); + curbuf->b_ml.ml_line_len = (int)textlen + wi * sizeof(textprop_T); } }