Commit 22662ca5 authored by Reinhard Tartler's avatar Reinhard Tartler

attributes: add av_noreturn

Also use it in the declaration of the various exit_program
implementations in avtools.

inspired by a clang-scan report.
parent a1641e95
...@@ -373,7 +373,7 @@ FILE *get_preset_file(char *filename, size_t filename_size, ...@@ -373,7 +373,7 @@ FILE *get_preset_file(char *filename, size_t filename_size,
* Do all the necessary cleanup and abort. * Do all the necessary cleanup and abort.
* This function is implemented in the avtools, not cmdutils. * This function is implemented in the avtools, not cmdutils.
*/ */
void exit_program(int ret); av_noreturn void exit_program(int ret);
/** /**
* Realloc array to hold new_size elements of elem_size. * Realloc array to hold new_size elements of elem_size.
......
...@@ -113,4 +113,10 @@ ...@@ -113,4 +113,10 @@
# define av_printf_format(fmtpos, attrpos) # define av_printf_format(fmtpos, attrpos)
#endif #endif
#if AV_GCC_VERSION_AT_LEAST(2,5)
# define av_noreturn __attribute__((noreturn))
#else
# define av_noreturn
#endif
#endif /* AVUTIL_ATTRIBUTES_H */ #endif /* AVUTIL_ATTRIBUTES_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment