summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2021-12-24 01:14:12 +0100
committerN-R-K <79544946+N-R-K@users.noreply.github.com>2022-01-06 18:53:02 +0100
commit90bec70e7f186f0e9dbf9e03e555ba50352caff2 (patch)
tree37310cd10fd9b61af4f18a97bcc6186f922b9c87 /main.c
parent1a185237723229720260a04cb61fcffa96dab4d9 (diff)
downloadnsxiv-90bec70e7f186f0e9dbf9e03e555ba50352caff2.tar.zst
fix -Wshadow related warnings
fixes all -Wshadow related warnings (on gcc). this would allow us to use `-Wshadow` in github workflow (https://github.com/nsxiv/nsxiv/pull/195). i've thought about adding `-Wshadow` to our Makefile as well, but decided against it to keep the Makefile CFLAGS barebore/minimal.
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main.c b/main.c
index 34c0254..f8c727f 100644
--- a/main.c
+++ b/main.c
@@ -605,19 +605,19 @@ end:
return true;
}
-static bool process_bindings(const keymap_t *keys, unsigned int len, KeySym ksym_or_button,
+static bool process_bindings(const keymap_t *bindings, unsigned int len, KeySym ksym_or_button,
unsigned int state, unsigned int implicit_mod)
{
unsigned int i;
bool dirty = false;
for (i = 0; i < len; i++) {
- if (keys[i].ksym_or_button == ksym_or_button &&
- MODMASK(keys[i].mask | implicit_mod) == MODMASK(state) &&
- keys[i].cmd.func &&
- (keys[i].cmd.mode == MODE_ALL || keys[i].cmd.mode == mode))
+ if (bindings[i].ksym_or_button == ksym_or_button &&
+ MODMASK(bindings[i].mask | implicit_mod) == MODMASK(state) &&
+ bindings[i].cmd.func &&
+ (bindings[i].cmd.mode == MODE_ALL || bindings[i].cmd.mode == mode))
{
- if (keys[i].cmd.func(keys[i].arg))
+ if (bindings[i].cmd.func(bindings[i].arg))
dirty = true;
}
}