More static code analysis cleanups

This commit is contained in:
twinaphex 2015-09-28 22:03:05 +02:00
parent 4f02326171
commit 94c3546e71
4 changed files with 12 additions and 9 deletions

View File

@ -98,7 +98,7 @@ static bool xenon360_input_meta_key_pressed(void *data, int key)
return (lifecycle_state & (UINT64_C(1) << key));
}
static uint64_t xenon360_get_capabilities(void *data)
static uint64_t xenon360_input_get_capabilities(void *data)
{
uint64_t caps = 0;

View File

@ -676,9 +676,12 @@ int menu_input_set_input_device_bind_mode(void *data,
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
if (!setting)
return -1;
bind_port = settings->input.joypad_map[setting->index_offset];
if (!setting || menu_input_set_bind_mode_common(setting, type) == -1)
if (menu_input_set_bind_mode_common(setting, type) == -1)
return -1;
menu_input_poll_bind_get_rested_axes(&menu_input->binds, bind_port);

View File

@ -47,7 +47,6 @@ enum action_iterate_type
static int action_iterate_help(char *s, size_t len, const char *label)
{
unsigned i;
menu_handle_t *menu = menu_driver_get_ptr();
settings_t *settings = config_get_ptr();
@ -86,6 +85,7 @@ static int action_iterate_help(char *s, size_t len, const char *label)
break;
case MENU_HELP_CONTROLS:
{
unsigned i;
char s2[PATH_MAX_LENGTH];
const unsigned binds[] = {
RETRO_DEVICE_ID_JOYPAD_UP,

View File

@ -61,7 +61,6 @@ typedef struct nbio_image_handle
unsigned processing_pos_increment;
unsigned pos_increment;
uint64_t frame_count;
uint64_t processing_frame_count;
int processing_final_state;
msg_queue_t *msg_queue;
unsigned status;
@ -294,8 +293,6 @@ static int rarch_main_data_image_iterate_process_transfer(nbio_handle_t *nbio)
break;
}
nbio->image.processing_frame_count++;
if (retval == IMAGE_PROCESS_NEXT)
return 0;
@ -312,7 +309,6 @@ static int rarch_main_data_image_iterate_parse_free(nbio_handle_t *nbio)
nbio->image.handle = NULL;
nbio->image.frame_count = 0;
nbio->image.processing_frame_count = 0;
msg_queue_clear(nbio->image.msg_queue);
@ -321,18 +317,22 @@ static int rarch_main_data_image_iterate_parse_free(nbio_handle_t *nbio)
static int rarch_main_data_image_iterate_process_transfer_parse(nbio_handle_t *nbio)
{
size_t len = 0;
if (nbio->image.handle && nbio->image.cb)
{
size_t len = 0;
nbio->image.cb(nbio, len);
}
return 0;
}
static int rarch_main_data_image_iterate_transfer_parse(nbio_handle_t *nbio)
{
size_t len = 0;
if (nbio->image.handle && nbio->image.cb)
{
size_t len = 0;
nbio->image.cb(nbio, len);
}
return 0;
}