History

build: Add _Pragma macro to disable deprecated declaration warnings

Diego Biurrun committed 13 years ago

Commit 3a7050f1 parent 79be2c32 files · +14 −0Browse files

Unified · Split

2 files
  1. configure +6 −0
  2. libavutil/internal.h +8 −0
configure+6−0
@@ -1319,6 +1319,7 @@ HAVE_LIST=" · 1318 unmodified lines
13191319 nanosleep
13201320 poll_h
13211321 posix_memalign
1322+ pragma_deprecated
13221323 rdtsc
13231324 sched_getaffinity
13241325 sdl
@@ -3393,6 +3394,11 @@ void foo(char * $restrict_keyword p); · 2068 unmodified lines
33933394 EOF
33943395 done
33953396
3397+check_cc <<EOF && enable pragma_deprecated
3398+_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
3399+_Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
3400+EOF
3401+
33963402 check_cc <<EOF && enable attribute_packed
33973403 struct { int x; } __attribute__((packed)) x;
33983404 EOF
libavutil/internal.h+8−0
@@ -61,6 +61,14 @@ · 60 unmodified lines
6161 # define av_export
6262 #endif
6363
64+#if HAVE_PRAGMA_DEPRECATED
65+# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
66+# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
67+#else
68+# define FF_DISABLE_DEPRECATION_WARNINGS
69+# define FF_ENABLE_DEPRECATION_WARNINGS
70+#endif
71+
6472 #ifndef INT_BIT
6573 # define INT_BIT (CHAR_BIT * sizeof(int))
6674 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t