mirror of
https://github.com/labwc/labwc.git
synced 2025-11-01 22:58:47 -04:00
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:
parent
ee0617ae23
commit
7eae03117e
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue