From 39578db1344ca298f2bb2fe2278a35108d5f2b66 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sun, 27 Jun 2021 13:20:36 +0200 Subject: [PATCH] render: @panic() if CLOCK_MONOTONIC is not supported Making this unreachable and invoking illegal behavior is incorrect. --- river/render.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/river/render.zig b/river/render.zig index a0275c9..aedeccf 100644 --- a/river/render.zig +++ b/river/render.zig @@ -52,7 +52,7 @@ pub fn renderOutput(output: *Output) void { const renderer = output.wlr_output.backend.getRenderer().?; var now: os.timespec = undefined; - os.clock_gettime(os.CLOCK_MONOTONIC, &now) catch unreachable; + os.clock_gettime(os.CLOCK_MONOTONIC, &now) catch @panic("CLOCK_MONOTONIC not supported"); var needs_frame: bool = undefined; var damage_region: pixman.Region32 = undefined;