mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-16 06:59:44 -05: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
|
|
@ -75,10 +75,8 @@ static enum zwp_tablet_tool_v2_type tablet_type_from_wlr_type(
|
|||
return ZWP_TABLET_TOOL_V2_TYPE_LENS;
|
||||
default:
|
||||
/* We skip these devices earlier on */
|
||||
assert(false && "Unreachable");
|
||||
abort(); // unreachable
|
||||
}
|
||||
|
||||
assert(false && "Unreachable");
|
||||
}
|
||||
|
||||
void destroy_tablet_tool_v2(struct wl_resource *resource) {
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ static bool positioner_anchor_has_edge(enum xdg_positioner_anchor anchor,
|
|||
anchor == XDG_POSITIONER_ANCHOR_TOP_RIGHT ||
|
||||
anchor == XDG_POSITIONER_ANCHOR_BOTTOM_RIGHT;
|
||||
default:
|
||||
assert(false); // not reached
|
||||
abort(); // unreachable
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue