From 542162c17bfb46558c9df4c74d5e78b91f70f1a0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 3 Feb 2021 10:39:29 +0100 Subject: [PATCH] Silence some warnings --- menu/cbs/menu_cbs_ok.c | 4 ++-- menu/drivers/materialui.c | 6 +++--- menu/drivers/ozone/ozone.c | 2 +- menu/drivers/xmb.c | 2 +- retroarch.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 4c97fa5a40..4082951993 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -2664,7 +2664,7 @@ int generic_action_ok_help(const char *path, static int action_ok_bluetooth(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - driver_bluetooth_connect_device(idx); + driver_bluetooth_connect_device((unsigned)idx); return 0; } @@ -6016,7 +6016,7 @@ static int action_ok_push_dropdown_item_video_shader_param_generic(const char *p { #if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL) video_shader_ctx_t shader_info; - unsigned offset = setting_offset; + unsigned offset = (unsigned)setting_offset; float val = atof(path); struct video_shader *shader = menu_shader_get(); struct video_shader_parameter *param_menu = NULL; diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index a72e0133c1..7dd624960c 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -2242,7 +2242,7 @@ static void materialui_set_node_playlist_icon( if (string_is_equal(playlist_file, icon_playlist_file)) { - node->icon_texture_index = i; + node->icon_texture_index = (unsigned)i; node->icon_type = MUI_ICON_TYPE_PLAYLIST; break; } @@ -3628,7 +3628,7 @@ static void materialui_render(void *data, (pointer_y < (entry_y + node->entry_height))) { /* Pointer selection is always updated */ - menu_input_set_pointer_selection(i); + menu_input_set_pointer_selection((unsigned)i); /* If pointer is pressed and stationary... */ if (mui->pointer.pressed && !mui->pointer.dragged) @@ -3638,7 +3638,7 @@ static void materialui_render(void *data, if (mui->touch_feedback_update_selection) { /* ...apply touch feedback to current entry */ - mui->touch_feedback_selection = i; + mui->touch_feedback_selection = (unsigned)i; /* ...and if pointer has been held for at least * MENU_INPUT_PRESS_TIME_SHORT ms, automatically diff --git a/menu/drivers/ozone/ozone.c b/menu/drivers/ozone/ozone.c index 4a6bbd5087..5b04ca97ee 100644 --- a/menu/drivers/ozone/ozone.c +++ b/menu/drivers/ozone/ozone.c @@ -1923,7 +1923,7 @@ static void ozone_render(void *data, (ozone->pointer.y < entry_y + node->height)) { /* Pointer selection is always updated */ - menu_input_set_pointer_selection(i); + menu_input_set_pointer_selection((unsigned)i); /* If pointer is a mouse, then automatically * select entry under cursor */ diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index e2c110f696..c26828cc9a 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -3894,7 +3894,7 @@ static void xmb_render(void *data, if ((pointer_y > y1) && (pointer_y < y2)) { - menu_input_set_pointer_selection(i); + menu_input_set_pointer_selection((unsigned)i); break; } } diff --git a/retroarch.c b/retroarch.c index 3652af8941..bedad2bb04 100644 --- a/retroarch.c +++ b/retroarch.c @@ -10048,7 +10048,7 @@ static bool command_read_ram(const char *arg) static bool command_write_ram(const char *arg) { - unsigned int addr = strtoul(arg, (char**)&arg, 16); + unsigned int addr = (unsigned int)strtoul(arg, (char**)&arg, 16); uint8_t *data = (uint8_t *)rcheevos_patch_address(addr); if (!data)