]> git.mdlowis.com Git - proto/labwc.git/commit
fix: fall-through to default cursor in cursor_get_from_edge()
authorAndrew J. Hesford <ajh@sideband.org>
Sat, 16 Dec 2023 02:21:06 +0000 (21:21 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 16 Dec 2023 20:11:05 +0000 (20:11 +0000)
commit7eae03117ef805bc86b07e1ff705c2cc195d7964
treeddd84dc695d7e43c0139097e98eb806123c3dd7c
parentee0617ae23d4aa478aca050ab0f703a07f423c4c
fix: fall-through to default cursor in cursor_get_from_edge()

When assertions are disabled, providing an unexpected input to
cursor_get_from_edge will cause the non-void function to terminate
without a return value. This may be effectively unreachable in practice.
However, returning a default cursor as a fall-through case will both
silence a compiler warning and prevent catastrophy should the function
ever be called with a permitted value.
src/input/cursor.c