diff options
author | Mike Williams <mrmrdubya@gmail.com> | 2024-06-01 11:33:40 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-06-01 11:33:40 +0200 |
commit | 16b63bd002d48fa0b04f27cf3ccca894e14db378 (patch) | |
tree | 4cbe9c87d4719b45a2fcbfbb2e397199bad8dfcc /src/ops.c | |
parent | bad9577b9ae7a6ab61ec636aaa1ed7d446ef5db9 (diff) |
patch 9.1.0455: MS-Windows: compiler warning for size_t to int conversionv9.1.0455
Problem: MS-Windows: compiler warning for size_t to int conversion
Solution: Add a few type casts to resolve warning on Windows
(Mike Williams)
closes: #14884
Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -580,7 +580,7 @@ block_insert( // copy the new text mch_memmove(newp + startcol, s, slen); - offset += slen; + offset += (int)slen; if (spaces > 0 && !bdp->is_short) { @@ -607,7 +607,7 @@ block_insert( if (b_insert) // correct any text properties - inserted_bytes(lnum, startcol, slen); + inserted_bytes(lnum, startcol, (int)slen); if (lnum == oap->end.lnum) { @@ -1722,7 +1722,7 @@ op_insert(oparg_T *oap, long count1) add = len; // short line, point to the NUL firstline += add; len -= add; - if (pre_textlen >= 0 && (ins_len = len - pre_textlen - offset) > 0) + if (pre_textlen >= 0 && (ins_len = (int)len - pre_textlen - offset) > 0) { ins_text = vim_strnsave(firstline, ins_len); if (ins_text != NULL) @@ -1866,7 +1866,7 @@ op_change(oparg_T *oap) // Shift the properties for linenr as edit() would do. if (curbuf->b_has_textprop) adjust_prop_columns(linenr, bd.textcol, - vpos.coladd + ins_len, 0); + vpos.coladd + (int)ins_len, 0); #endif } } |