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>
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 7b6fd92..6b0f920 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -540,7 +540,7 @@
char *fname2 = NULL;
char *ppath = NULL;
int i;
- int len;
+ size_t len;
size_t usedlen = 0;
char_u *fbuf = NULL;
@@ -549,7 +549,7 @@
goto add_err;
expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL);
- len = (int)STRLEN(fname);
+ len = STRLEN(fname);
fbuf = (char_u *)fname;
(void)modify_fname((char_u *)":p", FALSE, &usedlen,
(char_u **)&fname, &fbuf, &len);