diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2011-09-14 19:47:38 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2011-09-25 11:18:41 +0200 |
commit | fb1c30b71af5be58940ce15699dbcb311e33f2c6 (patch) | |
tree | ef9962955776396afaf30b23063e5107b467d6d0 | |
parent | 6f8c8fa8af9e422e9c3eb863033d0b2b6b43a32a (diff) | |
download | ffmpeg-fb1c30b71af5be58940ce15699dbcb311e33f2c6.tar.gz |
lavu/attributes: introduce AV_NOWARN_DEPRECATED.
-rw-r--r-- | libavutil/attributes.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavutil/attributes.h b/libavutil/attributes.h index e97fdfd466..3f761ef679 100644 --- a/libavutil/attributes.h +++ b/libavutil/attributes.h @@ -88,6 +88,24 @@ #endif #endif +/** + * Disable warnings about deprecated features + * This is useful for sections of code kept for backward compatibility and + * scheduled for removal. + */ +#ifndef AV_NOWARN_DEPRECATED +#if AV_GCC_VERSION_AT_LEAST(4,6) +# define AV_NOWARN_DEPRECATED(code) \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ + code \ + _Pragma("GCC diagnostic pop") +#else +# define AV_NOWARN_DEPRECATED(code) code +#endif +#endif + + #ifndef av_unused #if defined(__GNUC__) # define av_unused __attribute__((unused)) |