Silence warnings

This commit is contained in:
twinaphex 2017-10-03 00:53:09 +02:00
parent c91c4ff9c0
commit 702f1276d6
7 changed files with 13 additions and 12 deletions

View File

@ -342,7 +342,7 @@ static bool video_thread_handle_packet(
case CMD_INIT: case CMD_INIT:
thr->driver_data = thr->driver->init(&thr->info, thr->driver_data = thr->driver->init(&thr->info,
thr->input, thr->input_data); thr->input, thr->input_data);
pkt.data.b = thr->driver_data; pkt.data.b = (thr->driver_data != NULL);
thr->driver->viewport_info(thr->driver_data, &thr->vp); thr->driver->viewport_info(thr->driver_data, &thr->vp);
video_thread_reply(thr, &pkt); video_thread_reply(thr, &pkt);
break; break;

View File

@ -538,7 +538,7 @@ bool file_archive_extract_file(
userdata.decomp_state.opt_file = NULL; userdata.decomp_state.opt_file = NULL;
userdata.decomp_state.needle = NULL; userdata.decomp_state.needle = NULL;
userdata.decomp_state.size = 0; userdata.decomp_state.size = 0;
userdata.decomp_state.found = NULL; userdata.decomp_state.found = false;
if (!list) if (!list)
{ {
@ -602,7 +602,7 @@ struct string_list *file_archive_get_file_list(const char *path,
userdata.decomp_state.opt_file = NULL; userdata.decomp_state.opt_file = NULL;
userdata.decomp_state.needle = NULL; userdata.decomp_state.needle = NULL;
userdata.decomp_state.size = 0; userdata.decomp_state.size = 0;
userdata.decomp_state.found = NULL; userdata.decomp_state.found = false;
if (!userdata.list) if (!userdata.list)
goto error; goto error;

View File

@ -86,11 +86,12 @@ static bool menu_display_gdi_font_init_first(
bool is_threaded) bool is_threaded)
{ {
font_data_t **handle = (font_data_t**)font_handle; font_data_t **handle = (font_data_t**)font_handle;
*handle = font_driver_init_first(video_data, if (!(*handle = font_driver_init_first(video_data,
font_path, font_size, true, font_path, font_size, true,
is_threaded, is_threaded,
FONT_DRIVER_RENDER_GDI); FONT_DRIVER_RENDER_GDI)))
return *handle; return false;
return true;
} }
static const float *menu_display_gdi_get_default_vertices(void) static const float *menu_display_gdi_get_default_vertices(void)

View File

@ -1626,8 +1626,8 @@ bool menu_driver_is_alive(void)
* for framebuffer-based menu drivers, like RGUI. */ * for framebuffer-based menu drivers, like RGUI. */
bool menu_driver_is_texture_set(void) bool menu_driver_is_texture_set(void)
{ {
if (menu_driver_ctx) if (menu_driver_ctx && menu_driver_ctx->set_texture)
return menu_driver_ctx->set_texture; return true;
return false; return false;
} }
@ -2188,7 +2188,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
if (pending_push) if (pending_push)
if (menu_driver_ctx->navigation_clear) if (menu_driver_ctx->navigation_clear)
menu_driver_ctx->navigation_clear( menu_driver_ctx->navigation_clear(
menu_userdata, pending_push); menu_userdata, *pending_push);
} }
break; break;
case MENU_NAVIGATION_CTL_INCREMENT: case MENU_NAVIGATION_CTL_INCREMENT:

View File

@ -7303,7 +7303,7 @@ bool menu_setting_ctl(enum menu_setting_ctl_state state, void *data)
if (!setting->change_handler) if (!setting->change_handler)
return false; return false;
cbs_bound = setting->action_right; cbs_bound = (setting->action_right != NULL);
cbs_bound = cbs_bound || setting->action_left; cbs_bound = cbs_bound || setting->action_left;
cbs_bound = cbs_bound || setting->action_select; cbs_bound = cbs_bound || setting->action_select;

View File

@ -415,7 +415,7 @@ bool bsv_movie_ctl(enum bsv_ctl_state state, void *data)
switch (state) switch (state)
{ {
case BSV_MOVIE_CTL_IS_INITED: case BSV_MOVIE_CTL_IS_INITED:
return bsv_movie_state_handle; return (bsv_movie_state_handle != NULL);
case BSV_MOVIE_CTL_SET_START_RECORDING: case BSV_MOVIE_CTL_SET_START_RECORDING:
bsv_movie_state.movie_start_recording = true; bsv_movie_state.movie_start_recording = true;
break; break;

View File

@ -1557,7 +1557,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
} }
break; break;
case RARCH_CTL_HAS_CORE_OPTIONS: case RARCH_CTL_HAS_CORE_OPTIONS:
return runloop_core_options; return (runloop_core_options != NULL);
case RARCH_CTL_CORE_OPTIONS_LIST_GET: case RARCH_CTL_CORE_OPTIONS_LIST_GET:
{ {
core_option_manager_t **coreopts = (core_option_manager_t**)data; core_option_manager_t **coreopts = (core_option_manager_t**)data;