From e83cbde1a4b816a64cefde1fb8bdbac403079600 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 23 Jul 2013 00:45:23 +0200 Subject: Fix some -Wshadow warnings In general, this warning can hint to actual bugs. We don't enable it yet, because it would conflict with some unmerged code, and we should check with clang too (this commit was done by testing with gcc). --- core/input/input.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/input/input.c') diff --git a/core/input/input.c b/core/input/input.c index 467f6d6299..183cec7f09 100644 --- a/core/input/input.c +++ b/core/input/input.c @@ -559,7 +559,7 @@ static int print_cmd_list(m_option_t *cfg, char *optname, char *optparam); #define OPT_BASE_STRUCT struct MPOpts // Our command line options -static const m_option_t input_conf[] = { +static const m_option_t input_config[] = { OPT_STRING("conf", input.config_file, CONF_GLOBAL), OPT_INT("ar-delay", input.ar_delay, CONF_GLOBAL), OPT_INT("ar-rate", input.ar_rate, CONF_GLOBAL), @@ -573,7 +573,7 @@ static const m_option_t input_conf[] = { }; static const m_option_t mp_input_opts[] = { - { "input", (void *)&input_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, + { "input", (void *)&input_config, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, OPT_INTRANGE("doubleclick-time", input.doubleclick_time, 0, 0, 1000), OPT_FLAG("joystick", input.use_joystick, CONF_GLOBAL), OPT_FLAG("lirc", input.use_lirc, CONF_GLOBAL), @@ -1260,8 +1260,8 @@ static struct cmd_bind *find_any_bind_for_key(struct input_ctx *ictx, struct cmd_bind *bind = find_bind_for_key_section(ictx, s->name, n, keys); if (bind) { struct cmd_bind_section *bs = bind->owner; - for (int i = 0; i < n; i++) { - if (MP_KEY_DEPENDS_ON_MOUSE_POS(keys[i]) && bs->mouse_area_set && + for (int x = 0; x < n; x++) { + if (MP_KEY_DEPENDS_ON_MOUSE_POS(keys[x]) && bs->mouse_area_set && !test_rect(&bs->mouse_area, ictx->mouse_vo_x, ictx->mouse_vo_y)) goto skip; } -- cgit v1.2.3