1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-21 22:30:22 +00:00

Add MP_NORETURN and replace av_noreturn uses

av_noreturn is a rather recent addition to libavutil, and defining it
ourselves is trivial and makes playing compatibility games easier.
This commit is contained in:
wm4 2012-11-10 16:20:00 +01:00
parent a6c4f2646f
commit 5afacef0e4
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,8 @@
#ifdef __GNUC__
#define MP_NORETURN __attribute__((noreturn))
/** Use gcc attribute to check printf fns. a1 is the 1-based index of
* the parameter containing the format, and a2 the index of the first
* argument. **/
@ -19,6 +21,7 @@
#else
#define PRINTF_ATTRIBUTE(a1, a2)
#define MP_NORETURN
#endif
#endif

View File

@ -576,7 +576,7 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask)
}
}
static av_noreturn void exit_player(struct MPContext *mpctx,
static MP_NORETURN void exit_player(struct MPContext *mpctx,
enum exit_reason how, int rc)
{
uninit_player(mpctx, INITIALIZED_ALL);