mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 9.1.0959: Coverity complains about type conversion
Problem: Coverity complains about type conversion (after v9.1.0957) Solution: use size_t instead of int for file length (Yegappan Lakshmanan) closes: #16297 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
9739086de2
commit
00d3459ea6
@ -9700,7 +9700,7 @@ eval_vars(
|
||||
char_u *s;
|
||||
char_u *result;
|
||||
char_u *resultbuf = NULL;
|
||||
int resultlen;
|
||||
size_t resultlen;
|
||||
buf_T *buf;
|
||||
int valid = VALID_HEAD + VALID_PATH; // assume valid result
|
||||
int spec_idx;
|
||||
@ -9975,12 +9975,12 @@ eval_vars(
|
||||
break;
|
||||
}
|
||||
|
||||
resultlen = (int)STRLEN(result); // length of new string
|
||||
resultlen = STRLEN(result); // length of new string
|
||||
if (src[*usedlen] == '<') // remove the file name extension
|
||||
{
|
||||
++*usedlen;
|
||||
if ((s = vim_strrchr(result, '.')) != NULL && s >= gettail(result))
|
||||
resultlen = (int)(s - result);
|
||||
resultlen = s - result;
|
||||
}
|
||||
else if (!skip_mod)
|
||||
{
|
||||
|
Reference in New Issue
Block a user