From 67c23aec0e7abfceb2f394857cf014d40693df28 Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Thu, 4 Aug 2022 16:19:50 +0200 Subject: [PATCH] (Wayland) Stub out unused variables for now (menu_contentless_cores) Fix mistake - needed to set len to return value of fill_pathname_join_special (configuration.c) Fix some unused variable warnings on Linux --- configuration.c | 16 +++++----------- gfx/common/wayland_common.c | 6 +++++- menu/menu_contentless_cores.c | 3 ++- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/configuration.c b/configuration.c index c06b390caf..23ac4e6260 100644 --- a/configuration.c +++ b/configuration.c @@ -3041,18 +3041,12 @@ static bool check_menu_driver_compatibility(settings_t *settings) static config_file_t *open_default_config_file(void) { char conf_path[PATH_MAX_LENGTH]; - char app_path[PATH_MAX_LENGTH]; config_file_t *conf = NULL; - - #ifndef RARCH_CONSOLE - char application_data[PATH_MAX_LENGTH]; - bool has_application_data = false; - application_data[0] = '\0'; - #endif - - app_path[0] = '\0'; - +#ifndef RARCH_CONSOLE + char application_data[PATH_MAX_LENGTH] = {0}; +#endif #if defined(_WIN32) && !defined(_XBOX) + char app_path[PATH_MAX_LENGTH] = {0}; #if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP /* On UWP, the app install directory is not writable so use the writable LocalState dir instead */ fill_pathname_home_dir(app_path, sizeof(app_path)); @@ -3138,7 +3132,7 @@ static config_file_t *open_default_config_file(void) RARCH_WARN("Created new config file in: \"%s\".\n", conf_path); } #elif !defined(RARCH_CONSOLE) - has_application_data = + bool has_application_data = fill_pathname_application_data(application_data, sizeof(application_data)); diff --git a/gfx/common/wayland_common.c b/gfx/common/wayland_common.c index a47cfd6ea1..1a3a443b28 100644 --- a/gfx/common/wayland_common.c +++ b/gfx/common/wayland_common.c @@ -98,6 +98,8 @@ void libdecor_frame_handle_configure_common(struct libdecor_frame *frame, { int width, height; struct libdecor_state *state = NULL; + enum libdecor_window_state window_state; +#if 0 static const enum libdecor_window_state tiled_states = ( LIBDECOR_WINDOW_STATE_TILED_LEFT @@ -105,9 +107,9 @@ void libdecor_frame_handle_configure_common(struct libdecor_frame *frame, | LIBDECOR_WINDOW_STATE_TILED_TOP | LIBDECOR_WINDOW_STATE_TILED_BOTTOM ); - enum libdecor_window_state window_state; bool focused = false; bool tiled = false; +#endif wl->fullscreen = false; wl->maximized = false; @@ -117,8 +119,10 @@ void libdecor_frame_handle_configure_common(struct libdecor_frame *frame, { wl->fullscreen = (window_state & LIBDECOR_WINDOW_STATE_FULLSCREEN) != 0; wl->maximized = (window_state & LIBDECOR_WINDOW_STATE_MAXIMIZED) != 0; +#if 0 focused = (window_state & LIBDECOR_WINDOW_STATE_ACTIVE) != 0; tiled = (window_state & tiled_states) != 0; +#endif } if (!wl->libdecor_configuration_get_content_size(configuration, frame, diff --git a/menu/menu_contentless_cores.c b/menu/menu_contentless_cores.c index 518e1cb11d..f5a25fcb99 100644 --- a/menu/menu_contentless_cores.c +++ b/menu/menu_contentless_cores.c @@ -329,7 +329,8 @@ static void contentless_cores_load_icons(contentless_cores_state_t *state) struct texture_image ti = {0}; ti.supports_rgba = rgba_supported; - fill_pathname_join_special(icon_path, icon_directory, + len = fill_pathname_join_special( + icon_path, icon_directory, icon_name, sizeof(icon_path)); icon_path[len ] = '.'; icon_path[len+1] = 'p';