]> git.sesse.net Git - ffmpeg/commitdiff
build: Add _Pragma macro to disable deprecated declaration warnings
authorDiego Biurrun <diego@biurrun.de>
Wed, 27 Mar 2013 17:23:01 +0000 (18:23 +0100)
committerDiego Biurrun <diego@biurrun.de>
Fri, 2 Aug 2013 17:19:02 +0000 (19:19 +0200)
configure
libavutil/internal.h

index 3420f3c172bfc844e141a9aa8119e86d0cc28ea7..979cc600c36d8a27db3bef083e2af9d46d774484 100755 (executable)
--- a/configure
+++ b/configure
@@ -1319,6 +1319,7 @@ HAVE_LIST="
     nanosleep
     poll_h
     posix_memalign
+    pragma_deprecated
     rdtsc
     sched_getaffinity
     sdl
@@ -3393,6 +3394,11 @@ void foo(char * $restrict_keyword p);
 EOF
 done
 
+check_cc <<EOF && enable pragma_deprecated
+_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+_Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
+EOF
+
 check_cc <<EOF && enable attribute_packed
 struct { int x; } __attribute__((packed)) x;
 EOF
index 49534d4b58a3849d0eb57c371def256322e743e6..5a721f3a714643db470a8be4f16725e3896bbe6e 100644 (file)
 #    define av_export
 #endif
 
+#if HAVE_PRAGMA_DEPRECATED
+#    define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+#    define FF_ENABLE_DEPRECATION_WARNINGS  _Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
+#else
+#    define FF_DISABLE_DEPRECATION_WARNINGS
+#    define FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
 #ifndef INT_BIT
 #    define INT_BIT (CHAR_BIT * sizeof(int))
 #endif