More warning fixes
This commit is contained in:
parent
3635bf0d01
commit
4ee45304b0
|
@ -3053,7 +3053,10 @@ static bool config_load_file(global_t *global,
|
|||
buf[0] = '\0';
|
||||
|
||||
snprintf(buf, sizeof(buf), "led%u_map", i + 1);
|
||||
|
||||
/* TODO/FIXME - change of sign - led_map is unsigned */
|
||||
settings->uints.led_map[i]=-1;
|
||||
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.led_map[i], buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -293,9 +293,8 @@ bool core_backup_get_backup_crc(char *backup_path, uint32_t *crc)
|
|||
string_list_free(metadata_list);
|
||||
metadata_list = NULL;
|
||||
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
return true;
|
||||
case CORE_BACKUP_TYPE_LIB:
|
||||
{
|
||||
intfstream_t *backup_file = NULL;
|
||||
|
|
|
@ -266,7 +266,7 @@ int64_t cdfs_read_file(cdfs_file_t* file, void* buffer, uint64_t len)
|
|||
{
|
||||
cdfs_seek_track_sector(file->track, file->current_sector);
|
||||
intfstream_read(file->track->stream, file->sector_buffer, 2048);
|
||||
memcpy(buffer, file->sector_buffer, len);
|
||||
memcpy(buffer, file->sector_buffer, (size_t)len);
|
||||
file->current_sector_offset = len;
|
||||
file->sector_buffer_valid = 1;
|
||||
|
||||
|
@ -385,7 +385,7 @@ static cdfs_track_t* cdfs_open_cue_track(
|
|||
unsigned int track_offset = 0;
|
||||
intfstream_t *cue_stream = intfstream_open_file(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
int64_t stream_size = intfstream_get_size(cue_stream);
|
||||
char *cue_contents = (char*)malloc(stream_size + 1);
|
||||
char *cue_contents = (char*)malloc((size_t)(stream_size + 1));
|
||||
cdfs_track_t* track = NULL;
|
||||
|
||||
if (!cue_contents)
|
||||
|
|
|
@ -424,7 +424,7 @@ uint8_t* rpng_save_image_bgr24_string(const uint8_t *data,
|
|||
|
||||
*bytes = intfstream_get_ptr(intf_s);
|
||||
intfstream_rewind(intf_s);
|
||||
output = (uint8_t*)malloc((*bytes)*sizeof(uint8_t));
|
||||
output = (uint8_t*)malloc((size_t)((*bytes)*sizeof(uint8_t)));
|
||||
if (!output)
|
||||
GOTO_END_ERROR();
|
||||
intfstream_read(intf_s, output, *bytes);
|
||||
|
|
|
@ -251,7 +251,7 @@ int64_t retro_vfs_file_seek_internal(
|
|||
}
|
||||
#endif
|
||||
|
||||
if (lseek(stream->fd, offset, whence) < 0)
|
||||
if (lseek(stream->fd, (off_t)offset, whence) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
@ -610,7 +610,7 @@ int64_t retro_vfs_file_truncate_impl(libretro_vfs_implementation_file *stream, i
|
|||
if (_chsize(_fileno(stream->fp), length) != 0)
|
||||
return -1;
|
||||
#elif !defined(VITA) && !defined(PSP) && !defined(PS2) && !defined(ORBIS) && (!defined(SWITCH) || defined(HAVE_LIBNX))
|
||||
if (ftruncate(fileno(stream->fp), length) != 0)
|
||||
if (ftruncate(fileno(stream->fp), (off_t)length) != 0)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2383,7 +2383,8 @@ static bool playlist_read_file(playlist_t *playlist)
|
|||
goto json_cleanup;
|
||||
}
|
||||
|
||||
if (!JSON_Parser_Parse(context.parser, chunk, length, JSON_False))
|
||||
if (!JSON_Parser_Parse(context.parser, chunk,
|
||||
(size_t)length, JSON_False))
|
||||
{
|
||||
/* Note: Chunk may not be null-terminated.
|
||||
* It is therefore dangerous to print its contents.
|
||||
|
|
|
@ -19456,10 +19456,11 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
|||
return false;
|
||||
if (cb)
|
||||
p_rarch->audio_callback = *cb;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
case RETRO_ENVIRONMENT_SET_FRAME_TIME_CALLBACK:
|
||||
{
|
||||
|
@ -37303,10 +37304,8 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
|||
if (!string_is_empty(loaded_core_file) &&
|
||||
string_is_equal(core_file, loaded_core_file))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
return false;
|
||||
case RARCH_CTL_HAS_SET_USERNAME:
|
||||
return p_rarch->has_set_username;
|
||||
case RARCH_CTL_IS_INITED:
|
||||
|
|
|
@ -377,7 +377,7 @@ static void task_core_backup_handler(retro_task_t *task)
|
|||
|
||||
/* Update progress display */
|
||||
task_set_progress(task,
|
||||
(backup_handle->file_data_read * 100) / backup_handle->core_file_size);
|
||||
(int8_t)((backup_handle->file_data_read * 100) / backup_handle->core_file_size));
|
||||
}
|
||||
break;
|
||||
case CORE_BACKUP_CHECK_HISTORY:
|
||||
|
@ -856,7 +856,7 @@ static void task_core_restore_handler(retro_task_t *task)
|
|||
|
||||
/* Update progress display */
|
||||
task_set_progress(task,
|
||||
(backup_handle->file_data_read * 100) / backup_handle->backup_file_size);
|
||||
(int8_t)((backup_handle->file_data_read * 100) / backup_handle->backup_file_size));
|
||||
}
|
||||
break;
|
||||
case CORE_RESTORE_END:
|
||||
|
|
Loading…
Reference in New Issue