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.
This commit is contained in:
Andrew J. Hesford 2023-12-15 21:21:06 -05:00 committed by Johan Malm
parent ee0617ae23
commit 7eae03117e

View file

@ -91,6 +91,8 @@ cursor_get_from_edge(uint32_t resize_edges)
"Failed to resolve wlroots edge %u to cursor name", resize_edges);
assert(false);
}
return LAB_CURSOR_DEFAULT;
}
static enum lab_cursors