Unused variable cleanups

This commit is contained in:
sonninnos 2025-06-15 05:05:11 +03:00
parent fae1c6bcf6
commit 0785dd7548
12 changed files with 3 additions and 30 deletions

View File

@ -1340,7 +1340,6 @@ void d3d9_calculate_rect(d3d9_video_t *d3d,
bool force_full, bool force_full,
bool allow_rotate) bool allow_rotate)
{ {
float device_aspect = (float)*width / *height;
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
bool video_scale_integer = settings->bools.video_scale_integer; bool video_scale_integer = settings->bools.video_scale_integer;
struct video_viewport vp; struct video_viewport vp;
@ -1376,7 +1375,6 @@ void d3d9_calculate_rect(d3d9_video_t *d3d,
void d3d9_set_rotation(void *data, unsigned rot) void d3d9_set_rotation(void *data, unsigned rot)
{ {
d3d9_video_t *d3d = (d3d9_video_t*)data; d3d9_video_t *d3d = (d3d9_video_t*)data;
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
if (!d3d) if (!d3d)
return; return;
@ -1466,7 +1464,6 @@ static bool d3d9_overlay_load(void *data,
const void *image_data, unsigned num_images) const void *image_data, unsigned num_images)
{ {
unsigned i, y; unsigned i, y;
overlay_t *new_overlays = NULL;
d3d9_video_t *d3d = (d3d9_video_t*)data; d3d9_video_t *d3d = (d3d9_video_t*)data;
const struct texture_image *images = (const struct texture_image*) const struct texture_image *images = (const struct texture_image*)
image_data; image_data;

View File

@ -152,7 +152,6 @@ static bool win32_display_server_set_window_opacity(
{ {
#ifdef HAVE_WINDOW_TRANSP #ifdef HAVE_WINDOW_TRANSP
HWND hwnd = win32_get_window(); HWND hwnd = win32_get_window();
dispserv_win32_t *serv = (dispserv_win32_t*)data;
/* Set window transparency on Windows 2000 and above */ /* Set window transparency on Windows 2000 and above */
if (opacity < 100) if (opacity < 100)
{ {

View File

@ -294,7 +294,6 @@ static void gfx_display_d3d9_hlsl_draw_pipeline(
gfx_display_t *p_disp, gfx_display_t *p_disp,
void *data, unsigned video_width, unsigned video_height) void *data, unsigned video_width, unsigned video_height)
{ {
static float t = 0;
video_coord_array_t *ca = NULL; video_coord_array_t *ca = NULL;
if (!draw) if (!draw)

View File

@ -489,7 +489,6 @@ static void *gdi_init(const video_info_t *video,
input_driver_t **input, void **input_data) input_driver_t **input, void **input_data)
{ {
unsigned full_x, full_y; unsigned full_x, full_y;
void *ctx_data = NULL;
unsigned mode_width = 0, mode_height = 0; unsigned mode_width = 0, mode_height = 0;
unsigned win_width = 0, win_height = 0; unsigned win_width = 0, win_height = 0;
unsigned temp_width = 0, temp_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, static uintptr_t gdi_load_texture(void *video_data, void *data,
bool threaded, enum texture_filter_type filter_type) bool threaded, enum texture_filter_type filter_type)
{ {
void *tmpdata = NULL;
gdi_texture_t *texture = NULL; gdi_texture_t *texture = NULL;
struct texture_image *image = (struct texture_image*)data; struct texture_image *image = (struct texture_image*)data;

View File

@ -1211,9 +1211,6 @@ static void gl1_set_viewport(gl1_t *gl1,
bool force_full, bool allow_rotate) bool force_full, bool allow_rotate)
{ {
settings_t *settings = config_get_ptr(); 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; float device_aspect = (float)vp_width / vp_height;
if (gl1->ctx_driver->translate_aspect) if (gl1->ctx_driver->translate_aspect)
@ -2125,7 +2122,6 @@ static uintptr_t gl1_load_texture(void *video_data, void *data,
#ifdef HAVE_THREADS #ifdef HAVE_THREADS
if (threaded) if (threaded)
{ {
gl1_t *gl1 = (gl1_t*)video_data;
custom_command_method_t func = video_texture_load_wrap_gl1; custom_command_method_t func = video_texture_load_wrap_gl1;
return video_thread_texture_handle(data, func); return video_thread_texture_handle(data, func);

View File

@ -223,8 +223,6 @@ static void d3d9x_win32_font_render_msg(
else else
{ {
settings_t *settings = config_get_ptr(); 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_r = settings->floats.video_msg_color_r;
float video_msg_color_g = settings->floats.video_msg_color_g; float video_msg_color_g = settings->floats.video_msg_color_g;
float video_msg_color_b = settings->floats.video_msg_color_b; float video_msg_color_b = settings->floats.video_msg_color_b;

View File

@ -158,8 +158,6 @@ static void crt_switch_set_aspect(
static bool crt_sr2_init(videocrt_switch_t *p_switch, static bool crt_sr2_init(videocrt_switch_t *p_switch,
int monitor_index, unsigned int crt_mode, unsigned int super_width) int monitor_index, unsigned int crt_mode, unsigned int super_width)
{ {
char *mode;
const char *err_msg;
char index[10]; char index[10];
gfx_ctx_ident_t gfxctx; gfx_ctx_ident_t gfxctx;
char ra_config_path[PATH_MAX_LENGTH]; char ra_config_path[PATH_MAX_LENGTH];

View File

@ -72,13 +72,8 @@ typedef struct
static input_test_step_t input_test_steps[MAX_TEST_STEPS]; 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 current_test_step = 0;
static unsigned last_test_step = MAX_TEST_STEPS + 1; 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 */ /* 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) static void* test_input_init(const char *joypad_driver)
{ {
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
unsigned i;
RARCH_DBG("[Test input driver]: start\n"); RARCH_DBG("[Test input driver]: start\n");

View File

@ -328,8 +328,6 @@ static void winraw_update_mouse_state(winraw_input_t *wr,
} }
else else
{ {
int bottom = wr->prev_rect.bottom;
int right = wr->prev_rect.right;
wr->active_rect = wr->prev_rect; wr->active_rect = wr->prev_rect;
winraw_init_mouse_xy_mapping(wr); winraw_init_mouse_xy_mapping(wr);
wr->rect_delay = 0; wr->rect_delay = 0;

View File

@ -72,13 +72,8 @@ typedef struct
static input_test_step_t input_test_steps[MAX_TEST_STEPS]; 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 current_test_step = 0;
static unsigned last_test_step = MAX_TEST_STEPS + 1; 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 */ /* 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) static int32_t test_joypad_button(unsigned port_num, uint16_t joykey)
{ {
int16_t ret = 0;
if (port_num >= DEFAULT_MAX_PADS) if (port_num >= DEFAULT_MAX_PADS)
return 0; return 0;
if (joykey < NUM_BUTTONS) if (joykey < NUM_BUTTONS)

View File

@ -468,7 +468,10 @@ static void *xinput_joypad_init(void *data)
int32_t dinput_index = 0; 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, 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); (int32_t*)&dinput_index);
/* On success, found VID/PID from dinput index */ /* On success, found VID/PID from dinput index */
if (!success)
continue;
input_autoconfigure_connect( input_autoconfigure_connect(
name, name,

View File

@ -200,7 +200,6 @@ void runahead_secondary_core_destroy(void *data)
static char *get_tmpdir_alloc(const char *override_dir) static char *get_tmpdir_alloc(const char *override_dir)
{ {
const char *src = NULL;
char *path = NULL; char *path = NULL;
#ifdef _WIN32 #ifdef _WIN32
#ifdef LEGACY_WIN32 #ifdef LEGACY_WIN32