Skip to content

Commit

Permalink
Fixed some warnings that Xcode brought up.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 14, 2017
1 parent a65a7ed commit 692d5e8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/physfs.h
Expand Up @@ -2256,7 +2256,7 @@ typedef void (*PHYSFS_StringCallback)(void *data, const char *str);
* \typedef PHYSFS_EnumFilesCallback
* \brief Function signature for callbacks that enumerate files.
*
* \deprecated As of PhysicsFS 2.1, Use PHYSFS_EnumerateCallback with
* \warning As of PhysicsFS 2.1, Use PHYSFS_EnumerateCallback with
* PHYSFS_enumerate() instead; it gives you more control over the process.
*
* These are used to report a list of directory entries to an original caller,
Expand Down Expand Up @@ -3127,7 +3127,7 @@ PHYSFS_DECL int PHYSFS_mountIo(PHYSFS_Io *io, const char *fname,
*
* If this function fails, (del) is not called.
*
* \param ptr Address of the memory buffer containing the archive data.
* \param buf Address of the memory buffer containing the archive data.
* \param len Size of memory buffer, in bytes.
* \param del A callback that triggers upon unmount. Can be NULL.
* \param fname Filename that can represent this stream. Can be NULL.
Expand Down
4 changes: 3 additions & 1 deletion src/physfs_archiver_dir.c
Expand Up @@ -19,12 +19,14 @@ static char *cvtToDependent(const char *prepend, const char *path,
BAIL_IF(buf == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
snprintf(buf, buflen, "%s%s", prepend ? prepend : "", path);

if (__PHYSFS_platformDirSeparator != '/')
#if !__PHYSFS_STANDARD_DIRSEP
assert(__PHYSFS_platformDirSeparator != '/');
{
char *p;
for (p = strchr(buf, '/'); p != NULL; p = strchr(p + 1, '/'))
*p = __PHYSFS_platformDirSeparator;
} /* if */
#endif

return buf;
} /* cvtToDependent */
Expand Down
3 changes: 2 additions & 1 deletion src/physfs_archiver_zip.c
Expand Up @@ -1081,7 +1081,8 @@ static ZIPentry *zip_load_entry(ZIPinfo *info, const int zip64,
(retval->uncompressed_size == 0xFFFFFFFF)) )
{
int found = 0;
PHYSFS_uint16 sig, len;
PHYSFS_uint16 sig = 0;
PHYSFS_uint16 len = 0;
while (extralen > 4)
{
BAIL_IF_ERRPASS(!readui16(io, &sig), NULL);
Expand Down
1 change: 1 addition & 0 deletions src/physfs_internal.h
Expand Up @@ -405,6 +405,7 @@ void __PHYSFS_DirTreeDeinit(__PHYSFS_DirTree *dt);
#if defined(PHYSFS_PLATFORM_WINDOWS) || defined(PHYSFS_PLATFORM_OS2)
#define __PHYSFS_platformDirSeparator '\\'
#else
#define __PHYSFS_STANDARD_DIRSEP 1
#define __PHYSFS_platformDirSeparator '/'
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/physfs_platform_posix.c
Expand Up @@ -247,7 +247,7 @@ PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer,
int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos)
{
const int fd = *((int *) opaque);
const int rc = lseek(fd, (off_t) pos, SEEK_SET);
const off_t rc = lseek(fd, (off_t) pos, SEEK_SET);
BAIL_IF(rc == -1, errcodeFromErrno(), 0);
return 1;
} /* __PHYSFS_platformSeek */
Expand Down

0 comments on commit 692d5e8

Please sign in to comment.