Fixed some compiler warnings.
This commit is contained in:
parent
700d94e577
commit
df3c281014
|
@ -281,7 +281,7 @@ static PHYSFS_sint32 qpak_find_start_of_dir(QPAKinfo *info, const char *path,
|
|||
PHYSFS_sint32 lo = 0;
|
||||
PHYSFS_sint32 hi = (PHYSFS_sint32) (info->entryCount - 1);
|
||||
PHYSFS_sint32 middle;
|
||||
PHYSFS_uint32 dlen = strlen(path);
|
||||
PHYSFS_uint32 dlen = (PHYSFS_uint32) strlen(path);
|
||||
PHYSFS_sint32 retval = -1;
|
||||
const char *name;
|
||||
int rc;
|
||||
|
@ -357,7 +357,7 @@ static void QPAK_enumerateFiles(dvoid *opaque, const char *dname,
|
|||
if (i == -1) /* no such directory. */
|
||||
return;
|
||||
|
||||
dlen = strlen(dname);
|
||||
dlen = (PHYSFS_sint32) strlen(dname);
|
||||
if ((dlen > 0) && (dname[dlen - 1] == '/')) /* ignore trailing slash. */
|
||||
dlen--;
|
||||
|
||||
|
@ -398,7 +398,7 @@ static QPAKentry *qpak_find_entry(const QPAKinfo *info, const char *path,
|
|||
int *isDir)
|
||||
{
|
||||
QPAKentry *a = info->entries;
|
||||
PHYSFS_sint32 pathlen = strlen(path);
|
||||
PHYSFS_sint32 pathlen = (PHYSFS_sint32) strlen(path);
|
||||
PHYSFS_sint32 lo = 0;
|
||||
PHYSFS_sint32 hi = (PHYSFS_sint32) (info->entryCount - 1);
|
||||
PHYSFS_sint32 middle;
|
||||
|
|
|
@ -214,7 +214,7 @@ static PHYSFS_sint64 ZIP_read(PHYSFS_Io *_io, void *buf, PHYSFS_uint64 len)
|
|||
else
|
||||
{
|
||||
finfo->stream.next_out = buf;
|
||||
finfo->stream.avail_out = maxread;
|
||||
finfo->stream.avail_out = (uInt) maxread;
|
||||
|
||||
while (retval < maxread)
|
||||
{
|
||||
|
@ -551,7 +551,7 @@ static ZIPentry *zip_find_entry(const ZIPinfo *info, const char *path,
|
|||
int *isDir)
|
||||
{
|
||||
ZIPentry *a = info->entries;
|
||||
PHYSFS_sint32 pathlen = strlen(path);
|
||||
PHYSFS_sint32 pathlen = (PHYSFS_sint32) strlen(path);
|
||||
PHYSFS_sint32 lo = 0;
|
||||
PHYSFS_sint32 hi = (PHYSFS_sint32) (info->entryCount - 1);
|
||||
PHYSFS_sint32 middle;
|
||||
|
@ -1137,7 +1137,7 @@ static PHYSFS_sint32 zip_find_start_of_dir(ZIPinfo *info, const char *path,
|
|||
PHYSFS_sint32 lo = 0;
|
||||
PHYSFS_sint32 hi = (PHYSFS_sint32) (info->entryCount - 1);
|
||||
PHYSFS_sint32 middle;
|
||||
PHYSFS_uint32 dlen = strlen(path);
|
||||
PHYSFS_uint32 dlen = (PHYSFS_uint32) strlen(path);
|
||||
PHYSFS_sint32 retval = -1;
|
||||
const char *name;
|
||||
int rc;
|
||||
|
@ -1213,7 +1213,7 @@ static void ZIP_enumerateFiles(dvoid *opaque, const char *dname,
|
|||
if (i == -1) /* no such directory. */
|
||||
return;
|
||||
|
||||
dlen = strlen(dname);
|
||||
dlen = (PHYSFS_sint32) strlen(dname);
|
||||
if ((dlen > 0) && (dname[dlen - 1] == '/')) /* ignore trailing slash. */
|
||||
dlen--;
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ static PHYSFS_sint64 memoryIo_read(PHYSFS_Io *io, void *buf, PHYSFS_uint64 len)
|
|||
if (len > avail)
|
||||
len = avail;
|
||||
|
||||
memcpy(buf, info->buf + info->pos, len);
|
||||
memcpy(buf, info->buf + info->pos, (size_t) len);
|
||||
info->pos += len;
|
||||
return len;
|
||||
} /* memoryIo_read */
|
||||
|
|
|
@ -334,7 +334,7 @@ char *__PHYSFS_platformCvtToDependent(const char *prepend,
|
|||
const char *dirName,
|
||||
const char *append)
|
||||
{
|
||||
const int len = ((prepend) ? strlen(prepend) : 0) +
|
||||
const size_t len = ((prepend) ? strlen(prepend) : 0) +
|
||||
((append) ? strlen(append) : 0) +
|
||||
strlen(dirName) + 1;
|
||||
char *retval = (char *) allocator.Malloc(len);
|
||||
|
|
Loading…
Reference in New Issue