mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Fix -Wreturn-type warnings
When calling assert(0) instead of returning a value, -Wreturn-type warnings are triggered because assertions can be disabled. Replace these assertions with abort().
This commit is contained in:
parent
666498db01
commit
781ed1ff02
4 changed files with 4 additions and 9 deletions
|
|
@ -466,7 +466,6 @@ static void handle_tablet_tool_done(void *data,
|
|||
}
|
||||
|
||||
static enum wlr_tablet_tool_type tablet_type_to_wlr_type(enum zwp_tablet_tool_v2_type type) {
|
||||
|
||||
switch (type) {
|
||||
case ZWP_TABLET_TOOL_V2_TYPE_PEN:
|
||||
return WLR_TABLET_TOOL_TYPE_PEN;
|
||||
|
|
@ -485,8 +484,7 @@ static enum wlr_tablet_tool_type tablet_type_to_wlr_type(enum zwp_tablet_tool_v2
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
assert(false && "Unreachable");
|
||||
abort(); // unreachable
|
||||
}
|
||||
|
||||
static void handle_tablet_tool_type(void *data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue