[FFmpeg-cvslog] lavu/attributes: introduce AV_NOWARN_DEPRECATED.
Nicolas George
git at videolan.org
Sun Sep 25 11:43:19 CEST 2011
ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Wed Sep 14 19:47:38 2011 +0200| [fb1c30b71af5be58940ce15699dbcb311e33f2c6] | committer: Nicolas George
lavu/attributes: introduce AV_NOWARN_DEPRECATED.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb1c30b71af5be58940ce15699dbcb311e33f2c6
---
libavutil/attributes.h | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index e97fdfd..3f761ef 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))
More information about the ffmpeg-cvslog
mailing list