Silence more implicit conversions

This commit is contained in:
twinaphex 2021-01-16 21:03:57 +01:00
parent f4dc486a77
commit 41a8661bdf
3 changed files with 15 additions and 18 deletions

View File

@ -832,7 +832,8 @@ int64_t rzipstream_write(rzipstream_t *stream, const void *data, int64_t len)
* > i.e. minimum of space remaining in input buffer
* and remaining 'write data' size */
cache_size = stream->in_buf_size - stream->in_buf_ptr;
cache_size = (cache_size > data_len) ? data_len : cache_size;
if (cache_size > data_len)
cache_size = data_len;
/* Copy as much data as possible into
* the input buffer */

View File

@ -3834,11 +3834,11 @@ static int xmb_menu_entry_action(
static void xmb_render(void *data,
unsigned width, unsigned height, bool is_idle)
{
size_t i;
unsigned i;
float scale_factor;
xmb_handle_t *xmb = (xmb_handle_t*)data;
settings_t *settings = config_get_ptr();
unsigned end = (unsigned)menu_entries_get_size();
size_t end = menu_entries_get_size();
gfx_display_t *p_disp = disp_get_ptr();
gfx_animation_t *p_anim = anim_get_ptr();
@ -3883,7 +3883,7 @@ static void xmb_render(void *data,
if ((pointer_x > margin_left) && (pointer_x < margin_right))
{
unsigned first = 0;
unsigned last = end;
unsigned last = end;
if (height)
xmb_calculate_visible_range(xmb, height,
@ -3891,17 +3891,12 @@ static void xmb_render(void *data,
for (i = first; i <= last; i++)
{
float entry_size = (i == selection) ?
float entry_size = (i == (unsigned)selection) ?
xmb->icon_spacing_vertical * xmb->active_item_factor : xmb->icon_spacing_vertical;
float half_entry_size = entry_size * 0.5f;
float y_curr;
int y1;
int y2;
y_curr = xmb_item_y(xmb, (int)i, selection) + xmb->margins_screen_top;
y1 = (int)((y_curr - half_entry_size) + 0.5f);
y2 = (int)((y_curr + half_entry_size) + 0.5f);
float y_curr = xmb_item_y(xmb, (int)i, selection) + xmb->margins_screen_top;
int y1 = (int)((y_curr - half_entry_size) + 0.5f);
int y2 = (int)((y_curr + half_entry_size) + 0.5f);
if ((pointer_y > y1) && (pointer_y < y2))
{

View File

@ -10613,9 +10613,9 @@ static void handle_translation_cb(
char* raw_image_file_data = NULL;
struct scaler_ctx* scaler = NULL;
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
size_t new_image_size = 0;
int new_image_size = 0;
#ifdef HAVE_AUDIOMIXER
size_t new_sound_size = 0;
int new_sound_size = 0;
#endif
const void* dummy_data = NULL;
void* raw_image_data = NULL;
@ -10781,7 +10781,7 @@ static void handle_translation_cb(
ai_res = gfx_widgets_ai_service_overlay_load(
&p_rarch->dispwidget_st,
raw_image_file_data, (unsigned) new_image_size,
raw_image_file_data, (unsigned)new_image_size,
image_type);
if (!ai_res)
@ -10851,13 +10851,14 @@ static void handle_translation_cb(
goto finish;
}
rpng_set_buf_ptr(rpng, raw_image_file_data, new_image_size);
rpng_set_buf_ptr(rpng, raw_image_file_data, (size_t)new_image_size);
rpng_start(rpng);
while (rpng_iterate_image(rpng));
do
{
retval = rpng_process_image(rpng, &raw_image_data_alpha, new_image_size, &image_width, &image_height);
retval = rpng_process_image(rpng, &raw_image_data_alpha,
(size_t)new_image_size, &image_width, &image_height);
} while (retval == IMAGE_PROCESS_NEXT);
/* Returned output from the png processor is an upside down RGBA