From 10a9effc1d95a101f71495386145ff21270f3008 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 31 Jul 2016 14:29:33 +0200 Subject: [PATCH] Silence warnings --- configuration.c | 2 +- cores/libretro-imageviewer/image_core.c | 3 ++- menu/drivers/xmb.c | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/configuration.c b/configuration.c index d8cfd12228..575cf50ec0 100644 --- a/configuration.c +++ b/configuration.c @@ -2333,6 +2333,7 @@ static bool check_shader_compatibility(enum file_path_enum enum_idx) */ bool config_load_shader_preset(void) { + enum file_path_enum idx; char shader_directory[PATH_MAX_LENGTH] = {0}; /* path to the directory containing retroarch.cfg (prefix) */ char core_path[PATH_MAX_LENGTH] = {0}; /* final path for core-specific configuration (prefix+suffix) */ char game_path[PATH_MAX_LENGTH] = {0}; /* final path for game-specific configuration (prefix+suffix) */ @@ -2342,7 +2343,6 @@ bool config_load_shader_preset(void) global_t *global = global_get_ptr(); settings_t *settings = config_get_ptr(); rarch_system_info_t *system = NULL; - int idx; runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); diff --git a/cores/libretro-imageviewer/image_core.c b/cores/libretro-imageviewer/image_core.c index be78b7747e..a5f5fb2eb9 100644 --- a/cores/libretro-imageviewer/image_core.c +++ b/cores/libretro-imageviewer/image_core.c @@ -201,11 +201,12 @@ void IMAGE_CORE_PREFIX(retro_cheat_set)(unsigned a, bool b, const char * c) static bool imageviewer_load(const char *path, int image_index) { +#ifdef HAVE_STB_IMAGE int comp; +#endif imageviewer_free_image(); - (void)comp; #ifdef HAVE_STB_IMAGE image_buffer = (uint32_t*)stbi_load( path, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index bfc8af4ef8..ecf1f8ecb6 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1591,22 +1591,22 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, case FILE_TYPE_RPL_ENTRY: if (core_node) return core_node->content_icon; - else - switch (xmb->categories.selection_ptr) - { + + switch (xmb->categories.selection_ptr) + { #ifdef HAVE_IMAGEVIEWER - case XMB_SYSTEM_TAB_IMAGES: - return xmb->textures.list[XMB_TEXTURE_IMAGE]; + case XMB_SYSTEM_TAB_IMAGES: + return xmb->textures.list[XMB_TEXTURE_IMAGE]; #endif #ifdef HAVE_FFMPEG - case XMB_SYSTEM_TAB_MUSIC: - return xmb->textures.list[XMB_TEXTURE_MUSIC]; - case XMB_SYSTEM_TAB_VIDEO: - return xmb->textures.list[XMB_TEXTURE_MOVIE]; + case XMB_SYSTEM_TAB_MUSIC: + return xmb->textures.list[XMB_TEXTURE_MUSIC]; + case XMB_SYSTEM_TAB_VIDEO: + return xmb->textures.list[XMB_TEXTURE_MOVIE]; #endif - default: - return xmb->textures.list[XMB_TEXTURE_FILE]; - } + default: + break; + } return xmb->textures.list[XMB_TEXTURE_FILE]; case FILE_TYPE_CARCHIVE: return xmb->textures.list[XMB_TEXTURE_ZIP];