From 6eed40f80cd29b63ba334add95d35197a9a2c8d9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Dec 2019 08:18:00 +0100 Subject: [PATCH] More warning fixes for non-shader target platforms --- manual_content_scan.c | 9 +++++---- menu/menu_displaylist.c | 2 ++ retroarch.c | 15 +++++++-------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/manual_content_scan.c b/manual_content_scan.c index b5be9409ed..bf31ddac58 100644 --- a/manual_content_scan.c +++ b/manual_content_scan.c @@ -550,13 +550,15 @@ bool manual_content_scan_get_menu_core_name(const char **core_name) * > Returned string list must be free()'d */ struct string_list *manual_content_scan_get_menu_system_name_list(void) { - settings_t *settings = config_get_ptr(); - struct string_list *name_list = string_list_new(); union string_list_elem_attr attr; +#ifdef HAVE_LIBRETRODB + settings_t *settings = config_get_ptr(); +#endif + struct string_list *name_list = string_list_new(); /* Sanity check */ if (!name_list) - goto error; + return NULL; attr.i = 0; @@ -571,7 +573,6 @@ struct string_list *manual_content_scan_get_menu_system_name_list(void) goto error; #ifdef HAVE_LIBRETRODB - /* If platform has database support, get names * of all installed database files */ if (settings) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 08191a21e4..be9b5aa518 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -9885,6 +9885,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, } break; case DISPLAYLIST_DROPDOWN_LIST_VIDEO_SHADER_NUM_PASSES: +#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL) { unsigned i; struct video_shader *shader = menu_shader_get(); @@ -9910,6 +9911,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, info->need_refresh = true; info->need_push = true; } +#endif break; case DISPLAYLIST_DROPDOWN_LIST_SPECIAL: menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); diff --git a/retroarch.c b/retroarch.c index 851d7ed2b4..788fb94c8e 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2691,15 +2691,14 @@ static void retroarch_set_runtime_shader_preset(const char *arg) else runtime_shader_preset[0] = '\0'; } +#endif static void retroarch_unset_runtime_shader_preset(void) { +#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL) runtime_shader_preset[0] = '\0'; -} -#else -static void retroarch_set_runtime_shader_preset(const char *arg) {} -static void retroarch_unset_runtime_shader_preset(void) {} #endif +} #define MEASURE_FRAME_TIME_SAMPLES_COUNT (2 * 1024) @@ -29347,19 +29346,18 @@ bool accessibility_speak_linux( bool accessibility_speak_priority(const char* speak_text, int priority) { - const char* voice = NULL; RARCH_LOG("Spoke: %s\n", speak_text); if (is_accessibility_enabled()) { #if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) && !defined(EMSCRIPTEN) - voice = get_user_language_iso639_1(true); + const char *voice = get_user_language_iso639_1(true); return accessibility_speak_windows(speak_text, voice, priority); #elif defined(__APPLE__) && defined(_IS_OSX) && !defined(EMSCRIPTEN) - voice = get_user_language_iso639_1(false); + const char *voice = get_user_language_iso639_1(false); return accessibility_speak_macos(speak_text, voice, priority); #elif (defined(__linux__) || defined(__unix__)) && !defined(EMSCRIPTEN) - voice = get_user_language_iso639_1(true); + const char *voice = get_user_language_iso639_1(true); return accessibility_speak_linux(speak_text, voice, priority); #endif RARCH_LOG("Platform not supported for accessibility.\n"); @@ -29375,6 +29373,7 @@ bool accessibility_speak_priority(const char* speak_text, int priority) #endif */ } + return true; }