0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.1.0274: MS-Windows: a few compiler warnings

Problem:  MS-Windows: a few compiler warnings
Solution: Change variable types to resolve compiler warnings
          (Mike Williams)

Windows compiles were reporting a few size_t to signed integer
conversion warnings that can be resolved by changing the variable
declarations to be size_t to start with.

closes: #14429

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Mike Williams
2024-04-07 18:26:22 +02:00
committed by Christian Brabandt
parent b78753db5f
commit aca8f55596
3 changed files with 8 additions and 6 deletions

View File

@@ -1593,12 +1593,12 @@ op_insert(oparg_T *oap, long count1)
if (oap->block_mode)
{
long ins_len;
size_t ins_len;
char_u *firstline, *ins_text;
struct block_def bd2;
int did_indent = FALSE;
size_t len;
int add;
size_t add;
// offset when cursor was moved in insert mode
int offset = 0;
@@ -1703,7 +1703,7 @@ op_insert(oparg_T *oap, long count1)
return;
}
}
if ((size_t)add > len)
if (add > len)
add = len; // short line, point to the NUL
firstline += add;
len -= add;