From c704824b45731f2400355ebe8ae0c576e19dc072 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 25 Oct 2021 10:49:11 +0200 Subject: osdep: add MP_UNREACHABLE This seems to work on gcc, clang and mingw as-is, but I made it conditional on __GNUC__ just in case, even though I can't figure out which compilers we care about that don't export this define. Also replace all instances of assert(0) in the code by MP_UNREACHABLE(), which is a strict improvement. --- video/mp_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/mp_image.c') diff --git a/video/mp_image.c b/video/mp_image.c index 0e95a59808..e8d433cbfe 100644 --- a/video/mp_image.c +++ b/video/mp_image.c @@ -593,7 +593,7 @@ static bool endian_swap_bytes(void *d, size_t bytes, size_t word_size) AV_WL32(ud + x * 2, AV_RB32(ud + x * 2)); break; default: - assert(0); + MP_UNREACHABLE(); } return true; -- cgit v1.2.3