mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
Silence some signed/unsigned mismatch warnings
This commit is contained in:
parent
0eed1c4853
commit
6b71214ed7
@ -93,7 +93,7 @@ static bool gl2_raster_font_upload_atlas(gl2_raster_t *font)
|
||||
switch (ncomponents)
|
||||
{
|
||||
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];
|
||||
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;
|
||||
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];
|
||||
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++ = *src++;
|
||||
|
@ -541,7 +541,7 @@ static void gfx_widgets_msg_queue_kill_end(void *userdata)
|
||||
{
|
||||
int i;
|
||||
/* 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_size--;
|
||||
|
@ -980,7 +980,7 @@ void input_keyboard_line_append(
|
||||
struct input_keyboard_line *keyboard_line,
|
||||
const char *word, size_t len)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
char *newbuf = (char*)realloc(
|
||||
keyboard_line->buffer,
|
||||
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_RIGHT:
|
||||
{
|
||||
float dx, dy;
|
||||
if (ol_state)
|
||||
{
|
||||
unsigned index_offset = (desc->type == OVERLAY_TYPE_ANALOG_RIGHT) ? 2 : 0;
|
||||
|
@ -314,7 +314,7 @@ static void rpng_reverse_filter_copy_line_gray_alpha(uint32_t *data,
|
||||
|
||||
bpp /= 8;
|
||||
|
||||
for (i = 0; i < width; i++)
|
||||
for (i = 0; i < (int)width; i++)
|
||||
{
|
||||
uint32_t gray, alpha;
|
||||
|
||||
|
@ -10693,13 +10693,13 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list)
|
||||
if the user opt-in. */
|
||||
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,
|
||||
room->corename))
|
||||
break;
|
||||
}
|
||||
if (j >= coreinfos->count)
|
||||
if (j >= (int)coreinfos->count)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
if (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);
|
||||
|
||||
/* Adjust Y position */
|
||||
hw_state->y = (int16_t)(((float)(hw_state->y - vp.y) / (float)vp.height) * (float)fb_height);
|
||||
if (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);
|
||||
}
|
||||
|
||||
|
@ -4152,9 +4152,9 @@ static bool secondary_core_create(runloop_state_t *runloop_st,
|
||||
int 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->secondary_core.retro_set_controller_port_device(
|
||||
@ -8001,7 +8001,7 @@ int runloop_iterate(void)
|
||||
#endif
|
||||
|
||||
/* 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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user