Fix some structurally dead code warnings

This commit is contained in:
twinaphex 2017-05-09 20:54:03 +02:00
parent 5a9f6ad9b7
commit 9dff2434ef
3 changed files with 4 additions and 24 deletions

View File

@ -105,16 +105,7 @@ frontend_ctx_driver_t *frontend_ctx_find_driver(const char *ident)
**/
frontend_ctx_driver_t *frontend_ctx_init_first(void)
{
unsigned i;
frontend_ctx_driver_t *frontend = NULL;
for (i = 0; frontend_ctx_drivers[i]; i++)
{
frontend = frontend_ctx_drivers[i];
break;
}
return frontend;
return frontend_ctx_drivers[0];
}
bool frontend_driver_get_core_extension(char *s, size_t len)

View File

@ -138,14 +138,8 @@ bool video_shader_driver_deinit(void)
/* Finds first suitable shader context driver. */
bool video_shader_driver_init_first(void)
{
unsigned i;
for (i = 0; shader_ctx_drivers[i]; i++)
{
current_shader = shader_ctx_drivers[i];
return true;
}
return false;
current_shader = shader_ctx_drivers[0];
return true;
}
bool video_shader_driver_init(video_shader_ctx_init_t *init)

View File

@ -91,12 +91,7 @@ bool ui_companion_is_on_foreground(void)
**/
const ui_companion_driver_t *ui_companion_init_first(void)
{
unsigned i;
for (i = 0; ui_companion_drivers[i]; i++)
return ui_companion_drivers[i];
return NULL;
return ui_companion_drivers[0];
}
const ui_companion_driver_t *ui_companion_get_ptr(void)