summaryrefslogtreecommitdiff
path: root/win32/readdir.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-10-27 18:57:51 +0100
committerAnatol Belski <ab@php.net>2014-10-28 17:24:54 +0100
commit77ab77fd02b24aac32594c4f5f6ad21a2e961ed7 (patch)
tree9affc5858954ecb8f21344ec16bdbbe5c01ebfc3 /win32/readdir.c
parente048426402aa81c3b45473aa71c9bf8b9eee1a6f (diff)
downloadphp-git-77ab77fd02b24aac32594c4f5f6ad21a2e961ed7.tar.gz
fix datatype mismatch
Diffstat (limited to 'win32/readdir.c')
-rw-r--r--win32/readdir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/readdir.c b/win32/readdir.c
index 0edd5764d4..4e5992167c 100644
--- a/win32/readdir.c
+++ b/win32/readdir.c
@@ -37,7 +37,7 @@ DIR *opendir(const char *dir)
return NULL;
}
strcpy(filespec, resolved_path_buff);
- index = strlen(filespec) - 1;
+ index = (int)strlen(filespec) - 1;
if (index >= 0 && (filespec[index] == '/' ||
(filespec[index] == '\\' && (index == 0 || !IsDBCSLeadByte(filespec[index-1])))))
filespec[index] = '\0';
@@ -83,7 +83,7 @@ struct dirent *readdir(DIR *dp)
strlcpy(dp->dent.d_name, dp->fileinfo.cFileName, _MAX_FNAME+1);
dp->dent.d_ino = 1;
- dp->dent.d_reclen = strlen(dp->dent.d_name);
+ dp->dent.d_reclen = (unsigned short)strlen(dp->dent.d_name);
dp->dent.d_off = dp->offset;
return &(dp->dent);
@@ -107,7 +107,7 @@ int readdir_r(DIR *dp, struct dirent *entry, struct dirent **result)
strlcpy(dp->dent.d_name, dp->fileinfo.cFileName, _MAX_FNAME+1);
dp->dent.d_ino = 1;
- dp->dent.d_reclen = strlen(dp->dent.d_name);
+ dp->dent.d_reclen = (unsigned short)strlen(dp->dent.d_name);
dp->dent.d_off = dp->offset;
memcpy(entry, &dp->dent, sizeof(*entry));
@@ -152,7 +152,7 @@ int rewinddir(DIR *dp)
}
strcpy(filespec, dp->dir);
- index = strlen(filespec) - 1;
+ index = (int)strlen(filespec) - 1;
if (index >= 0 && (filespec[index] == '/' ||
(filespec[index] == '\\' && (index == 0 || !IsDBCSLeadByte(filespec[index-1])))))
filespec[index] = '\0';