fix some warnings

This commit is contained in:
notaz 2013-08-15 02:49:14 +03:00
parent 8b43bc737b
commit 8e5639bc3d
2 changed files with 8 additions and 6 deletions

View file

@ -90,8 +90,9 @@ int mp3_get_bitrate(void *f_, int len)
if (ret <= 0) { if (ret <= 0) {
// try to read somewhere around the middle // try to read somewhere around the middle
fseek(f, len / 2, SEEK_SET); fseek(f, len / 2, SEEK_SET);
fread(buf, 1, sizeof(buf), f); ret = fread(buf, 1, sizeof(buf), f);
ret = try_get_bitrate(buf, sizeof(buf)); if (ret == sizeof(buf))
ret = try_get_bitrate(buf, sizeof(buf));
} }
if (ret > 0) if (ret > 0)
retval = ret; retval = ret;

View file

@ -28,10 +28,6 @@
#include "common/version.h" #include "common/version.h"
#include "libretro.h" #include "libretro.h"
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif
static retro_video_refresh_t video_cb; static retro_video_refresh_t video_cb;
static retro_input_poll_t input_poll_cb; static retro_input_poll_t input_poll_cb;
static retro_input_state_t input_state_cb; static retro_input_state_t input_state_cb;
@ -167,6 +163,11 @@ static void munmap(void *addr, size_t length)
/* ruh-ro, we leaked handle from CreateFileMapping() ... */ /* ruh-ro, we leaked handle from CreateFileMapping() ... */
} }
#endif #endif
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif
void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed) void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed)
{ {
int flags = MAP_PRIVATE | MAP_ANONYMOUS; int flags = MAP_PRIVATE | MAP_ANONYMOUS;