Silence some warnings

This commit is contained in:
twinaphex 2017-12-15 18:31:12 +01:00
parent 4572675a15
commit 42462c2ba9
3 changed files with 8 additions and 9 deletions

View File

@ -29,11 +29,11 @@ void* video_display_server_init(void)
switch (type) switch (type)
{ {
#if defined(_WIN32) && !defined(_XBOX)
case RARCH_DISPLAY_WIN32: case RARCH_DISPLAY_WIN32:
#if defined(_WIN32) && !defined(_XBOX)
current_display_server = &dispserv_win32; current_display_server = &dispserv_win32;
break;
#endif #endif
break;
default: default:
current_display_server = &dispserv_null; current_display_server = &dispserv_null;
break; break;

View File

@ -38,7 +38,7 @@ RFILE* rfopen(const char *path, const char *mode)
if (strstr(mode, "+")) if (strstr(mode, "+"))
retro_mode = RETRO_VFS_FILE_ACCESS_READ_WRITE; retro_mode = RETRO_VFS_FILE_ACCESS_READ_WRITE;
return filestream_open(path, retro_mode, -1); return filestream_open(path, retro_mode, RETRO_VFS_FILE_ACCESS_HINT_NONE);
} }
int rfclose(RFILE* stream) int rfclose(RFILE* stream)

View File

@ -157,7 +157,7 @@ int64_t retro_vfs_file_seek_internal(libretro_vfs_implementation_file *stream, i
} }
#endif #endif
if (lseek(stream->fd, offset, whence) < 0) if (lseek(stream->fd, (off_t)offset, whence) < 0)
goto error; goto error;
return 0; return 0;
@ -385,7 +385,7 @@ int64_t retro_vfs_file_read_impl(libretro_vfs_implementation_file *stream, void
goto error; goto error;
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
return fread(s, 1, len, stream->fp); return fread(s, 1, (size_t)len, stream->fp);
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS) if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS)
@ -403,7 +403,7 @@ int64_t retro_vfs_file_read_impl(libretro_vfs_implementation_file *stream, void
} }
#endif #endif
return read(stream->fd, s, len); return read(stream->fd, s, (size_t)len);
error: error:
return -1; return -1;
@ -415,13 +415,13 @@ int64_t retro_vfs_file_write_impl(libretro_vfs_implementation_file *stream, cons
goto error; goto error;
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
return fwrite(s, 1, len, stream->fp); return fwrite(s, 1, (size_t)len, stream->fp);
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS) if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS)
goto error; goto error;
#endif #endif
return write(stream->fd, s, len); return write(stream->fd, s, (size_t)len);
error: error:
return -1; return -1;
@ -534,7 +534,6 @@ int retro_vfs_file_rename_impl(const char *old_path, const char *new_path)
#else #else
return rename(old_path, new_path); return rename(old_path, new_path);
#endif #endif
return -1;
} }
const char *retro_vfs_file_get_path_impl(libretro_vfs_implementation_file *stream) const char *retro_vfs_file_get_path_impl(libretro_vfs_implementation_file *stream)