From 1201d59f0b5b8acc93f15904b745ec342548f9c1 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 10 Jan 2023 19:26:51 +0100 Subject: various: replace abort() with MP_ASSERT_UNREACHABLE() where appropriate In debug mode the macro causes an assertion failure. In release mode it works differently and tells the compiler that it can assume the codepath will never execute. For this reason I was conversative in replacing it, e.g. in mpv-internal code that exhausts all valid values of an enum or when a condition is clear from directly preceding code. --- video/out/placebo/ra_pl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out/placebo/ra_pl.c') diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c index d2590d35d3..dd24e1dadf 100644 --- a/video/out/placebo/ra_pl.c +++ b/video/out/placebo/ra_pl.c @@ -617,7 +617,7 @@ static void renderpass_run_pl(struct ra *ra, case RA_VARTYPE_BUF_RW: bind.object = (* (struct ra_buf **) val->data)->priv; break; - default: abort(); + default: MP_ASSERT_UNREACHABLE(); }; p->binds[p->inp_index[val->index]] = bind; -- cgit v1.2.3