Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2011-09-14 21:47:38 +0400
committerNicolas George <nicolas.george@normalesup.org>2011-09-25 13:18:41 +0400
commitfb1c30b71af5be58940ce15699dbcb311e33f2c6 (patch)
treeef9962955776396afaf30b23063e5107b467d6d0 /libavutil/attributes.h
parent6f8c8fa8af9e422e9c3eb863033d0b2b6b43a32a (diff)
lavu/attributes: introduce AV_NOWARN_DEPRECATED.
Diffstat (limited to 'libavutil/attributes.h')
-rw-r--r--libavutil/attributes.h18
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))