From 53225ca62c40b78c53d07144e880097609abad4c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 13 Jul 2017 00:21:25 -0400 Subject: [PATCH] Fixed more Visual Studio compiler warnings. --- src/archiver_iso9660.c | 4 ++-- src/archiver_zip.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/archiver_iso9660.c b/src/archiver_iso9660.c index 98e10a2..ebcc4d7 100644 --- a/src/archiver_iso9660.c +++ b/src/archiver_iso9660.c @@ -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); diff --git a/src/archiver_zip.c b/src/archiver_zip.c index 9b74132..b27b795 100644 --- a/src/archiver_zip.c +++ b/src/archiver_zip.c @@ -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);