diff options
author | wm4 <wm4@nowhere> | 2013-11-01 13:00:15 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-01 13:00:15 +0100 |
commit | dd344b43e87ef5a24a4ba739821998605e38a015 (patch) | |
tree | c0066b9e73fbb6f7ba5a46fed65db9a3a53a9695 /mpvcore/input/input.c | |
parent | 2696148d64364b40e7b0d1d3de017d6afce4b43d (diff) | |
download | mpv-dd344b43e87ef5a24a4ba739821998605e38a015.tar.bz2 mpv-dd344b43e87ef5a24a4ba739821998605e38a015.tar.xz |
Enable -Wshadow
This one really did bite me hard (see previous commit), so enable it by
default.
Fix some cases of shadowing throughout the codebase. None of these
change behavior, and all of these were correct code, and just tripped up
the warning.
Diffstat (limited to 'mpvcore/input/input.c')
-rw-r--r-- | mpvcore/input/input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpvcore/input/input.c b/mpvcore/input/input.c index 0f7c0f6b4a..e9c628dedb 100644 --- a/mpvcore/input/input.c +++ b/mpvcore/input/input.c @@ -1407,10 +1407,10 @@ static mp_cmd_t *get_cmd_from_keys(struct input_ctx *ictx, char *force_section, static void update_mouse_section(struct input_ctx *ictx) { - struct cmd_bind *cmd = + struct cmd_bind *bind = find_any_bind_for_key(ictx, NULL, 1, (int[]){MP_KEY_MOUSE_MOVE}); - char *new_section = cmd ? cmd->owner->section : "default"; + char *new_section = bind ? bind->owner->section : "default"; char *old = ictx->mouse_section; ictx->mouse_section = new_section; |