summaryrefslogtreecommitdiffstats
path: root/src/filepath.c
diff options
context:
space:
mode:
authorMike Williams <mrmrdubya@gmail.com>2024-05-30 07:46:30 +0200
committerChristian Brabandt <cb@256bit.org>2024-05-30 07:46:30 +0200
commit51024bbc1a9e298b1fb8f2e465fccb5db409551e (patch)
tree5da6ae660fbc1ab6a6f54f08741e1e6d00f1a461 /src/filepath.c
parent8904d672befb496cf224f01bc042683bb6120e81 (diff)
patch 9.1.0449: MS-Windows: Compiler warningsv9.1.0449
Problem: MS-Windows: Compiler warnings Solution: Resolve size_t to int warnings closes: #14874 A couple of warnings in ex_docmd.c have been resolved by modifying their function argument types, followed by some changes in various function call sites. This also allowed removal of some casts to cope with size_t/int conversion. Signed-off-by: Mike Williams <mrmrdubya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/filepath.c')
-rw-r--r--src/filepath.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/filepath.c b/src/filepath.c
index 3bf8a2d269..e68075a45e 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -292,7 +292,7 @@ shortpath_for_partial(
modify_fname(
char_u *src, // string with modifiers
int tilde_file, // "~" is a file name, not $HOME
- int *usedlen, // characters after src that are used
+ size_t *usedlen, // characters after src that are used
char_u **fnamep, // file name so far
char_u **bufp, // buffer for allocated file name or NULL
int *fnamelen) // length of fnamep
@@ -668,7 +668,7 @@ repeat:
str = vim_strnsave(*fnamep, *fnamelen);
if (sub != NULL && str != NULL)
{
- *usedlen = (int)(p + 1 - src);
+ *usedlen = p + 1 - src;
s = do_string_sub(str, pat, sub, NULL, flags);
if (s != NULL)
{
@@ -1038,7 +1038,7 @@ f_fnamemodify(typval_T *argvars, typval_T *rettv)
{
char_u *fname;
char_u *mods;
- int usedlen = 0;
+ size_t usedlen = 0;
int len = 0;
char_u *fbuf = NULL;
char_u buf[NUMBUFLEN];
@@ -2707,7 +2707,7 @@ home_replace(
if (homedir_env != NULL && *homedir_env == '~')
{
- int usedlen = 0;
+ size_t usedlen = 0;
int flen;
char_u *fbuf = NULL;
@@ -3170,7 +3170,7 @@ expand_wildcards_eval(
char_u *eval_pat = NULL;
char_u *exp_pat = *pat;
char *ignored_msg;
- int usedlen;
+ size_t usedlen;
int is_cur_alt_file = *exp_pat == '%' || *exp_pat == '#';
int star_follows = FALSE;