diff --git a/gfx/common/d3d9_common.c b/gfx/common/d3d9_common.c index fc5062098d..bfff991ced 100644 --- a/gfx/common/d3d9_common.c +++ b/gfx/common/d3d9_common.c @@ -1340,7 +1340,6 @@ void d3d9_calculate_rect(d3d9_video_t *d3d, bool force_full, bool allow_rotate) { - float device_aspect = (float)*width / *height; settings_t *settings = config_get_ptr(); bool video_scale_integer = settings->bools.video_scale_integer; struct video_viewport vp; @@ -1376,7 +1375,6 @@ void d3d9_calculate_rect(d3d9_video_t *d3d, void d3d9_set_rotation(void *data, unsigned rot) { d3d9_video_t *d3d = (d3d9_video_t*)data; - struct video_ortho ortho = {0, 1, 0, 1, -1, 1}; if (!d3d) return; @@ -1466,7 +1464,6 @@ static bool d3d9_overlay_load(void *data, const void *image_data, unsigned num_images) { unsigned i, y; - overlay_t *new_overlays = NULL; d3d9_video_t *d3d = (d3d9_video_t*)data; const struct texture_image *images = (const struct texture_image*) image_data; diff --git a/gfx/display_servers/dispserv_win32.c b/gfx/display_servers/dispserv_win32.c index 884ca35cab..0faf4d751d 100644 --- a/gfx/display_servers/dispserv_win32.c +++ b/gfx/display_servers/dispserv_win32.c @@ -152,7 +152,6 @@ static bool win32_display_server_set_window_opacity( { #ifdef HAVE_WINDOW_TRANSP HWND hwnd = win32_get_window(); - dispserv_win32_t *serv = (dispserv_win32_t*)data; /* Set window transparency on Windows 2000 and above */ if (opacity < 100) { diff --git a/gfx/drivers/d3d9hlsl.c b/gfx/drivers/d3d9hlsl.c index 1d846935b0..5447695299 100644 --- a/gfx/drivers/d3d9hlsl.c +++ b/gfx/drivers/d3d9hlsl.c @@ -294,7 +294,6 @@ static void gfx_display_d3d9_hlsl_draw_pipeline( gfx_display_t *p_disp, void *data, unsigned video_width, unsigned video_height) { - static float t = 0; video_coord_array_t *ca = NULL; if (!draw) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 3558614ba1..2b517e2086 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -489,7 +489,6 @@ static void *gdi_init(const video_info_t *video, input_driver_t **input, void **input_data) { unsigned full_x, full_y; - void *ctx_data = NULL; unsigned mode_width = 0, mode_height = 0; unsigned win_width = 0, win_height = 0; unsigned temp_width = 0, temp_height = 0; @@ -901,7 +900,6 @@ static void gdi_set_video_mode(void *data, unsigned width, unsigned height, static uintptr_t gdi_load_texture(void *video_data, void *data, bool threaded, enum texture_filter_type filter_type) { - void *tmpdata = NULL; gdi_texture_t *texture = NULL; struct texture_image *image = (struct texture_image*)data; diff --git a/gfx/drivers/gl1.c b/gfx/drivers/gl1.c index 1c07a317bc..be77013645 100644 --- a/gfx/drivers/gl1.c +++ b/gfx/drivers/gl1.c @@ -1211,9 +1211,6 @@ static void gl1_set_viewport(gl1_t *gl1, bool force_full, bool allow_rotate) { settings_t *settings = config_get_ptr(); - unsigned height = gl1->video_height; - int x = 0; - int y = 0; float device_aspect = (float)vp_width / vp_height; if (gl1->ctx_driver->translate_aspect) @@ -2125,7 +2122,6 @@ static uintptr_t gl1_load_texture(void *video_data, void *data, #ifdef HAVE_THREADS if (threaded) { - gl1_t *gl1 = (gl1_t*)video_data; custom_command_method_t func = video_texture_load_wrap_gl1; return video_thread_texture_handle(data, func); diff --git a/gfx/drivers_font/d3d9x_w32_font.c b/gfx/drivers_font/d3d9x_w32_font.c index 244247fe4e..3b955d3bc5 100644 --- a/gfx/drivers_font/d3d9x_w32_font.c +++ b/gfx/drivers_font/d3d9x_w32_font.c @@ -223,8 +223,6 @@ static void d3d9x_win32_font_render_msg( else { settings_t *settings = config_get_ptr(); - float video_msg_pos_x = settings->floats.video_msg_pos_x; - float video_msg_pos_y = settings->floats.video_msg_pos_y; float video_msg_color_r = settings->floats.video_msg_color_r; float video_msg_color_g = settings->floats.video_msg_color_g; float video_msg_color_b = settings->floats.video_msg_color_b; diff --git a/gfx/video_crt_switch.c b/gfx/video_crt_switch.c index 4d7a9591ee..0021291ad8 100644 --- a/gfx/video_crt_switch.c +++ b/gfx/video_crt_switch.c @@ -158,8 +158,6 @@ static void crt_switch_set_aspect( static bool crt_sr2_init(videocrt_switch_t *p_switch, int monitor_index, unsigned int crt_mode, unsigned int super_width) { - char *mode; - const char *err_msg; char index[10]; gfx_ctx_ident_t gfxctx; char ra_config_path[PATH_MAX_LENGTH]; diff --git a/input/drivers/test_input.c b/input/drivers/test_input.c index bc66f86155..d814eade44 100644 --- a/input/drivers/test_input.c +++ b/input/drivers/test_input.c @@ -72,13 +72,8 @@ typedef struct static input_test_step_t input_test_steps[MAX_TEST_STEPS]; -static unsigned current_frame = 0; -static unsigned next_teststep_frame = 0; static unsigned current_test_step = 0; static unsigned last_test_step = MAX_TEST_STEPS + 1; -static uint32_t input_state_validated = 0; -static uint32_t combo_state_validated = 0; -static bool dump_state_blocked = false; /************************************/ /* JSON Helpers for test input file */ @@ -367,7 +362,6 @@ static void test_input_free_input(void *data) static void* test_input_init(const char *joypad_driver) { settings_t *settings = config_get_ptr(); - unsigned i; RARCH_DBG("[Test input driver]: start\n"); diff --git a/input/drivers/winraw_input.c b/input/drivers/winraw_input.c index 8487598717..1c82b32240 100644 --- a/input/drivers/winraw_input.c +++ b/input/drivers/winraw_input.c @@ -328,8 +328,6 @@ static void winraw_update_mouse_state(winraw_input_t *wr, } else { - int bottom = wr->prev_rect.bottom; - int right = wr->prev_rect.right; wr->active_rect = wr->prev_rect; winraw_init_mouse_xy_mapping(wr); wr->rect_delay = 0; diff --git a/input/drivers_joypad/test_joypad.c b/input/drivers_joypad/test_joypad.c index c4c93c2b07..530c196be6 100644 --- a/input/drivers_joypad/test_joypad.c +++ b/input/drivers_joypad/test_joypad.c @@ -72,13 +72,8 @@ typedef struct static input_test_step_t input_test_steps[MAX_TEST_STEPS]; -static uint32_t current_frame = 0; -static uint32_t next_teststep_frame = 0; static unsigned current_test_step = 0; static unsigned last_test_step = MAX_TEST_STEPS + 1; -static uint32_t input_state_validated = 0; -static uint32_t combo_state_validated = 0; -static bool dump_state_blocked = false; /************************************/ /* JSON Helpers for test input file */ @@ -344,7 +339,6 @@ static void *test_joypad_init(void *data) static int32_t test_joypad_button(unsigned port_num, uint16_t joykey) { - int16_t ret = 0; if (port_num >= DEFAULT_MAX_PADS) return 0; if (joykey < NUM_BUTTONS) diff --git a/input/drivers_joypad/xinput_hybrid_joypad.c b/input/drivers_joypad/xinput_hybrid_joypad.c index 5a331cbe8e..1daa98177a 100644 --- a/input/drivers_joypad/xinput_hybrid_joypad.c +++ b/input/drivers_joypad/xinput_hybrid_joypad.c @@ -468,7 +468,10 @@ static void *xinput_joypad_init(void *data) int32_t dinput_index = 0; bool success = dinput_joypad_get_vidpid_from_xinput_index((int32_t)PAD_INDEX_TO_XUSER_INDEX(j), (int32_t*)&vid, (int32_t*)&pid, (int32_t*)&dinput_index); + /* On success, found VID/PID from dinput index */ + if (!success) + continue; input_autoconfigure_connect( name, diff --git a/runahead.c b/runahead.c index a6e69e63bf..fa81ab1d90 100644 --- a/runahead.c +++ b/runahead.c @@ -200,7 +200,6 @@ void runahead_secondary_core_destroy(void *data) static char *get_tmpdir_alloc(const char *override_dir) { - const char *src = NULL; char *path = NULL; #ifdef _WIN32 #ifdef LEGACY_WIN32