From 84974c7e5c8fc17166a2b894ef4b90d1d1ea1362 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sat, 22 Jun 2019 15:09:59 +0200 Subject: [PATCH] Silence more warnings --- deps/rcheevos/src/rcheevos/richpresence.c | 12 ++++++------ menu/drivers/ozone/ozone_display.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/deps/rcheevos/src/rcheevos/richpresence.c b/deps/rcheevos/src/rcheevos/richpresence.c index fe7c3c0ed5..1ac64a56c4 100644 --- a/deps/rcheevos/src/rcheevos/richpresence.c +++ b/deps/rcheevos/src/rcheevos/richpresence.c @@ -78,7 +78,7 @@ static rc_richpresence_display_t* rc_parse_richpresence_display_internal(const c /* handle string part */ part->display_type = RC_FORMAT_STRING; - part->text = rc_alloc_str(parse, line, ptr - line); + part->text = rc_alloc_str(parse, line, (int)(ptr - line)); if (part->text) { /* remove backslashes used for escaping */ in = part->text; @@ -203,7 +203,7 @@ static const char* rc_parse_richpresence_lookup(rc_richpresence_lookup_t* lookup line += chars + 1; if (chars == 1 && number[0] == '*') { - defaultlabel = rc_alloc_str(parse, line, endline - line); + defaultlabel = rc_alloc_str(parse, line, (int)(endline - line)); continue; } @@ -214,7 +214,7 @@ static const char* rc_parse_richpresence_lookup(rc_richpresence_lookup_t* lookup item = RC_ALLOC(rc_richpresence_lookup_item_t, parse); item->value = key; - item->label = rc_alloc_str(parse, line, endline - line); + item->label = rc_alloc_str(parse, line, (int)(endline - line)); *next = item; next = &item->next_item; } @@ -257,7 +257,7 @@ void rc_parse_richpresence_internal(rc_richpresence_t* self, const char* script, line += 7; lookup = RC_ALLOC(rc_richpresence_lookup_t, parse); - lookup->name = rc_alloc_str(parse, line, endline - line); + lookup->name = rc_alloc_str(parse, line, (int)(endline - line)); lookup->format = RC_FORMAT_LOOKUP; *nextlookup = lookup; nextlookup = &lookup->next; @@ -268,7 +268,7 @@ void rc_parse_richpresence_internal(rc_richpresence_t* self, const char* script, line += 7; lookup = RC_ALLOC(rc_richpresence_lookup_t, parse); - lookup->name = rc_alloc_str(parse, line, endline - line); + lookup->name = rc_alloc_str(parse, line, (int)(endline - line)); lookup->first_item = 0; *nextlookup = lookup; nextlookup = &lookup->next; @@ -419,7 +419,7 @@ int rc_evaluate_richpresence(rc_richpresence_t* richpresence, char* buffer, unsi part = part->next; } - return (ptr - buffer); + return (int)(ptr - buffer); } display = display->next; diff --git a/menu/drivers/ozone/ozone_display.c b/menu/drivers/ozone/ozone_display.c index 2fa8948132..db7e43d61e 100644 --- a/menu/drivers/ozone/ozone_display.c +++ b/menu/drivers/ozone/ozone_display.c @@ -165,21 +165,21 @@ static void ozone_draw_cursor_fallback(ozone_handle_t *ozone, menu_display_set_alpha(ozone->theme_dynamic.selection, alpha); /* Fill */ - menu_display_draw_quad(video_info, x_offset, y, width, height - 5, video_info->width, video_info->height, ozone->theme_dynamic.selection); + menu_display_draw_quad(video_info, x_offset, (int)y, width, height - 5, video_info->width, video_info->height, ozone->theme_dynamic.selection); /* Borders (can't do one single quad because of alpha) */ /* Top */ - menu_display_draw_quad(video_info, x_offset - 3, y - 3, width + 6, 3, video_info->width, video_info->height, ozone->theme_dynamic.selection_border); + menu_display_draw_quad(video_info, x_offset - 3, (int)(y - 3), width + 6, 3, video_info->width, video_info->height, ozone->theme_dynamic.selection_border); /* Bottom */ - menu_display_draw_quad(video_info, x_offset - 3, y + height - 5, width + 6, 3, video_info->width, video_info->height, ozone->theme_dynamic.selection_border); + menu_display_draw_quad(video_info, x_offset - 3, (int)(y + height - 5), width + 6, 3, video_info->width, video_info->height, ozone->theme_dynamic.selection_border); /* Left */ - menu_display_draw_quad(video_info, x_offset - 3, y, 3, height - 5, video_info->width, video_info->height, ozone->theme_dynamic.selection_border); + menu_display_draw_quad(video_info, (int)(x_offset - 3), (int)y, 3, height - 5, video_info->width, video_info->height, ozone->theme_dynamic.selection_border); /* Right */ - menu_display_draw_quad(video_info, x_offset + width, y, 3, height - 5, video_info->width, video_info->height, ozone->theme_dynamic.selection_border); + menu_display_draw_quad(video_info, x_offset + width, (int)y, 3, height - 5, video_info->width, video_info->height, ozone->theme_dynamic.selection_border); } void ozone_draw_cursor(ozone_handle_t *ozone,