From b0f54b896a0f9baf3dd03201fe479e42a1be207e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 4 Sep 2015 18:41:53 +0200 Subject: [PATCH] Clean up unused variables --- libretro-common/file/retro_dirent.c | 5 ++++- menu/cbs/menu_cbs_ok.c | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libretro-common/file/retro_dirent.c b/libretro-common/file/retro_dirent.c index f2194442b4..7310c886d1 100644 --- a/libretro-common/file/retro_dirent.c +++ b/libretro-common/file/retro_dirent.c @@ -48,8 +48,12 @@ struct RDIR *retro_opendir(const char *name) { char path_buf[1024]; struct RDIR *rdir = (struct RDIR*)calloc(1, sizeof(*rdir)); + if (!rdir) return NULL; + + (void)path_buf; + #if defined(_WIN32) snprintf(path_buf, sizeof(path_buf), "%s\\*", name); rdir->directory = FindFirstFile(path_buf, &rdir->entry); @@ -114,7 +118,6 @@ bool retro_dirent_is_dir(struct RDIR *rdir, const char *path) const WIN32_FIND_DATA *entry = (const WIN32_FIND_DATA*)rdir->entry; return entry->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; #elif defined(PSP) || defined(VITA) - const SceIoDirent *entry = (const SceIoDirent*)rdir->entry; #if defined(PSP) return (entry->d_stat.st_attr & FIO_SO_IFDIR) == FIO_SO_IFDIR; diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index fc202629e0..1f90b4aa6c 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -380,7 +380,6 @@ static int rarch_defer_core_wrapper(size_t idx, size_t entry_idx, const char *pa int ret = 0; menu_handle_t *menu = menu_driver_get_ptr(); menu_list_t *menu_list = menu_list_get_ptr(); - settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); if (!menu) @@ -1644,8 +1643,6 @@ static int action_ok_load_archive_detect_core(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { int ret = 0; - menu_displaylist_info_t info = {0}; - settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); size_t selected = menu_navigation_get_current_selection(); menu_handle_t *menu = menu_driver_get_ptr();