Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
15352:bcb99492a20f | 15353:21580db06cf3 |
---|---|
260 } | 260 } |
261 | 261 |
262 if (lnum == end_lnum) | 262 if (lnum == end_lnum) |
263 length = end_col - col; | 263 length = end_col - col; |
264 else | 264 else |
265 length = textlen - col + 1; | 265 length = (int)textlen - col + 1; |
266 if (length > (long)textlen) | 266 if (length > (long)textlen) |
267 length = textlen; // can include the end-of-line | 267 length = (int)textlen; // can include the end-of-line |
268 if (length < 0) | 268 if (length < 0) |
269 length = 0; // zero-width property | 269 length = 0; // zero-width property |
270 | 270 |
271 // Allocate the new line with space for the new proprety. | 271 // Allocate the new line with space for the new proprety. |
272 newtext = alloc(buf->b_ml.ml_line_len + sizeof(textprop_T)); | 272 newtext = alloc(buf->b_ml.ml_line_len + sizeof(textprop_T)); |
970 ++wi; | 970 ++wi; |
971 } | 971 } |
972 if (dirty) | 972 if (dirty) |
973 { | 973 { |
974 curbuf->b_ml.ml_flags |= ML_LINE_DIRTY; | 974 curbuf->b_ml.ml_flags |= ML_LINE_DIRTY; |
975 curbuf->b_ml.ml_line_len = textlen + wi * sizeof(textprop_T); | 975 curbuf->b_ml.ml_line_len = (int)textlen + wi * sizeof(textprop_T); |
976 } | 976 } |
977 } | 977 } |
978 | 978 |
979 #endif // FEAT_TEXT_PROP | 979 #endif // FEAT_TEXT_PROP |