From: notaz Date: Wed, 14 Aug 2013 23:49:14 +0000 (+0300) Subject: fix some warnings X-Git-Tag: v1.85~3 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e5639bc3da6c24c45620505a2bf3533478b1e60;p=picodrive.git fix some warnings --- diff --git a/platform/common/mp3.c b/platform/common/mp3.c index 9b347e89..25c5c928 100644 --- a/platform/common/mp3.c +++ b/platform/common/mp3.c @@ -90,8 +90,9 @@ int mp3_get_bitrate(void *f_, int len) if (ret <= 0) { // try to read somewhere around the middle fseek(f, len / 2, SEEK_SET); - fread(buf, 1, sizeof(buf), f); - ret = try_get_bitrate(buf, sizeof(buf)); + ret = fread(buf, 1, sizeof(buf), f); + if (ret == sizeof(buf)) + ret = try_get_bitrate(buf, sizeof(buf)); } if (ret > 0) retval = ret; diff --git a/platform/libretro.c b/platform/libretro.c index c02b2061..b2697cec 100644 --- a/platform/libretro.c +++ b/platform/libretro.c @@ -28,10 +28,6 @@ #include "common/version.h" #include "libretro.h" -#ifndef MAP_ANONYMOUS -#define MAP_ANONYMOUS MAP_ANON -#endif - static retro_video_refresh_t video_cb; static retro_input_poll_t input_poll_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() ... */ } #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) { int flags = MAP_PRIVATE | MAP_ANONYMOUS;