Fixed more Visual Studio compiler warnings.

This commit is contained in:
Ryan C. Gordon 2017-07-13 00:21:25 -04:00
parent 1bacc6d6af
commit 53225ca62c
2 changed files with 3 additions and 3 deletions

View File

@ -358,7 +358,7 @@ static int iso_readimage(ISO9660Handle *handle, PHYSFS_uint64 where,
handle->currpos += (PHYSFS_uint64) rc;
__PHYSFS_platformReleaseMutex(handle->mutex);
return rc;
return (int) rc; /* !!! FIXME: should this return "int" ? */
} /* iso_readimage */
@ -709,7 +709,7 @@ static int iso_file_seek_foreign(ISO9660FileHandle *fhandle,
PHYSFS_sint64 pos;
BAIL_IF(offset < 0, PHYSFS_ERR_INVALID_ARGUMENT, 0);
BAIL_IF(((PHYSFS_uint64) offset) >= fhandle->filesize, PHYSFS_ERR_PAST_EOF, 0);
BAIL_IF(offset >= fhandle->filesize, PHYSFS_ERR_PAST_EOF, 0);
pos = fhandle->startblock * 2048 + offset;
BAIL_IF_ERRPASS(!fhandle->io->seek(fhandle->io, pos), -1);

View File

@ -1681,7 +1681,7 @@ static PHYSFS_Io *ZIP_openRead(void *opaque, const char *filename)
const PHYSFS_uint64 len = (PHYSFS_uint64) (ptr - filename);
char *str = (char *) __PHYSFS_smallAlloc(len + 1);
BAIL_IF(!str, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
memcpy(str, filename, len);
memcpy(str, filename, (size_t) len);
str[len] = '\0';
entry = zip_find_entry(info, str);
__PHYSFS_smallFree(str);