diff options
author | Niklas Haas <git@haasn.dev> | 2021-10-25 10:49:11 +0200 |
---|---|---|
committer | Niklas Haas <github-daiK1o@haasn.dev> | 2021-11-03 14:09:27 +0100 |
commit | c704824b45731f2400355ebe8ae0c576e19dc072 (patch) | |
tree | c9410eb47d37fa0b0d5d43af34e6998f3114d1b6 /player | |
parent | 210767169191e19c70f9c7b63528b0d629ddbcfa (diff) | |
download | mpv-c704824b45731f2400355ebe8ae0c576e19dc072.tar.bz2 mpv-c704824b45731f2400355ebe8ae0c576e19dc072.tar.xz |
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.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index 4f0055513d..6a639fd361 100644 --- a/player/command.c +++ b/player/command.c @@ -155,7 +155,7 @@ static void hook_remove(struct MPContext *mpctx, struct hook_handler *h) return; } } - assert(0); + MP_UNREACHABLE(); } bool mp_hook_test_completion(struct MPContext *mpctx, char *type) |