Silence some signed/unsigned mismatch warnings

This commit is contained in:
libretroadmin 2022-11-21 19:34:43 +01:00
parent 0eed1c4853
commit 6b71214ed7
7 changed files with 13 additions and 14 deletions

View File

@ -93,7 +93,7 @@ static bool gl2_raster_font_upload_atlas(gl2_raster_t *font)
switch (ncomponents) switch (ncomponents)
{ {
case 1: case 1:
for (i = 0; i < font->atlas->height; ++i) for (i = 0; i < (int)font->atlas->height; ++i)
{ {
const uint8_t *src = &font->atlas->buffer[i * font->atlas->width]; const uint8_t *src = &font->atlas->buffer[i * font->atlas->width];
uint8_t *dst = &tmp[i * font->tex_width * ncomponents]; uint8_t *dst = &tmp[i * font->tex_width * ncomponents];
@ -102,12 +102,12 @@ static bool gl2_raster_font_upload_atlas(gl2_raster_t *font)
} }
break; break;
case 2: case 2:
for (i = 0; i < font->atlas->height; ++i) for (i = 0; i < (int)font->atlas->height; ++i)
{ {
const uint8_t *src = &font->atlas->buffer[i * font->atlas->width]; const uint8_t *src = &font->atlas->buffer[i * font->atlas->width];
uint8_t *dst = &tmp[i * font->tex_width * ncomponents]; uint8_t *dst = &tmp[i * font->tex_width * ncomponents];
for (j = 0; j < font->atlas->width; ++j) for (j = 0; j < (int)font->atlas->width; ++j)
{ {
*dst++ = 0xff; *dst++ = 0xff;
*dst++ = *src++; *dst++ = *src++;

View File

@ -541,7 +541,7 @@ static void gfx_widgets_msg_queue_kill_end(void *userdata)
{ {
int i; int i;
/* Remove it from the list */ /* Remove it from the list */
for (i = p_dispwidget->msg_queue_kill; i < p_dispwidget->current_msgs_size - 1; i++) for (i = p_dispwidget->msg_queue_kill; i < (int)(p_dispwidget->current_msgs_size - 1); i++)
p_dispwidget->current_msgs[i] = p_dispwidget->current_msgs[i + 1]; p_dispwidget->current_msgs[i] = p_dispwidget->current_msgs[i + 1];
p_dispwidget->current_msgs_size--; p_dispwidget->current_msgs_size--;

View File

@ -980,7 +980,7 @@ void input_keyboard_line_append(
struct input_keyboard_line *keyboard_line, struct input_keyboard_line *keyboard_line,
const char *word, size_t len) const char *word, size_t len)
{ {
int i; size_t i;
char *newbuf = (char*)realloc( char *newbuf = (char*)realloc(
keyboard_line->buffer, keyboard_line->buffer,
keyboard_line->size + len * 2); keyboard_line->size + len * 2);
@ -1186,7 +1186,6 @@ static bool input_overlay_add_inputs_inner(overlay_desc_t *desc,
case OVERLAY_TYPE_ANALOG_LEFT: case OVERLAY_TYPE_ANALOG_LEFT:
case OVERLAY_TYPE_ANALOG_RIGHT: case OVERLAY_TYPE_ANALOG_RIGHT:
{ {
float dx, dy;
if (ol_state) if (ol_state)
{ {
unsigned index_offset = (desc->type == OVERLAY_TYPE_ANALOG_RIGHT) ? 2 : 0; unsigned index_offset = (desc->type == OVERLAY_TYPE_ANALOG_RIGHT) ? 2 : 0;

View File

@ -314,7 +314,7 @@ static void rpng_reverse_filter_copy_line_gray_alpha(uint32_t *data,
bpp /= 8; bpp /= 8;
for (i = 0; i < width; i++) for (i = 0; i < (int)width; i++)
{ {
uint32_t gray, alpha; uint32_t gray, alpha;

View File

@ -10693,13 +10693,13 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list)
if the user opt-in. */ if the user opt-in. */
if (show_only_installed_cores) if (show_only_installed_cores)
{ {
for (j = 0; j < coreinfos->count; j++) for (j = 0; j < (int)coreinfos->count; j++)
{ {
if (string_is_equal_case_insensitive(coreinfos->list[j].core_name, if (string_is_equal_case_insensitive(coreinfos->list[j].core_name,
room->corename)) room->corename))
break; break;
} }
if (j >= coreinfos->count) if (j >= (int)coreinfos->count)
continue; continue;
} }

View File

@ -1984,14 +1984,14 @@ void menu_input_get_mouse_hw_state(
hw_state->x = (int16_t)(((float)(hw_state->x - vp.x) / (float)vp.width) * (float)fb_width); hw_state->x = (int16_t)(((float)(hw_state->x - vp.x) / (float)vp.width) * (float)fb_width);
if (hw_state->x < 0) if (hw_state->x < 0)
hw_state->x = 0; hw_state->x = 0;
else if (hw_state->x >= fb_width) else if (hw_state->x >= (int)fb_width)
hw_state->x = (fb_width -1); hw_state->x = (fb_width -1);
/* Adjust Y position */ /* Adjust Y position */
hw_state->y = (int16_t)(((float)(hw_state->y - vp.y) / (float)vp.height) * (float)fb_height); hw_state->y = (int16_t)(((float)(hw_state->y - vp.y) / (float)vp.height) * (float)fb_height);
if (hw_state->y < 0) if (hw_state->y < 0)
hw_state->y = 0; hw_state->y = 0;
else if (hw_state->y >= fb_height) else if (hw_state->y >= (int)fb_height)
hw_state->y = (fb_height-1); hw_state->y = (fb_height-1);
} }

View File

@ -4152,9 +4152,9 @@ static bool secondary_core_create(runloop_state_t *runloop_st,
int port; int port;
for (port = 0; port < MAX_USERS; port++) for (port = 0; port < MAX_USERS; port++)
{ {
if (port < info->ports.size) if (port < (int)info->ports.size)
{ {
unsigned device = (port < num_active_users) ? unsigned device = (port < (int)num_active_users) ?
runloop_st->port_map[port] : RETRO_DEVICE_NONE; runloop_st->port_map[port] : RETRO_DEVICE_NONE;
runloop_st->secondary_core.retro_set_controller_port_device( runloop_st->secondary_core.retro_set_controller_port_device(
@ -8001,7 +8001,7 @@ int runloop_iterate(void)
#endif #endif
/* Restores analog D-pad binds temporarily overridden. */ /* Restores analog D-pad binds temporarily overridden. */
for (i = 0; i < max_users; i++) for (i = 0; i < (int)max_users; i++)
{ {
if (dpad_mode[i] != ANALOG_DPAD_NONE) if (dpad_mode[i] != ANALOG_DPAD_NONE)
{ {