mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
config: fix "maybe-uninitialized" error when compiling with CFLAGS=-Og
Using GCC 12.2.0 with the following build steps:
CFLAGS=-Og meson bld
ninja -C bld
...produces the compiler error:
../config.c:2000:18: error: ‘sym_equal’ may be used uninitialized
[-Werror=maybe-uninitialized]
This commit fixes that by using BUG() to assert that all possible
values are accounted for in the offending switch statement.
This commit is contained in:
parent
1c072856eb
commit
8dcfa259a2
1 changed files with 3 additions and 0 deletions
3
config.c
3
config.c
|
|
@ -2008,6 +2008,9 @@ resolve_key_binding_collisions(struct config *conf, const char *section_name,
|
|||
sym_equal = (binding1->m.button == binding2->m.button &&
|
||||
binding1->m.count == binding2->m.count);
|
||||
break;
|
||||
|
||||
default:
|
||||
BUG("unhandled key binding type");
|
||||
}
|
||||
|
||||
if (!mods_equal || !sym_equal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue