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
1319 nanosleep1319 nanosleep
1320 poll_h1320 poll_h
1321 posix_memalign1321 posix_memalign
1322 pragma_deprecated
1322 rdtsc1323 rdtsc
1323 sched_getaffinity1324 sched_getaffinity
1324 sdl1325 sdl
@@ -3393,6 +3394,11 @@ void foo(char * $restrict_keyword p); · 2068 unmodified lines
3393EOF3394EOF
3394done3395done
3395 3396
3397check_cc <<EOF && enable pragma_deprecated
3398_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
3399_Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
3400EOF
3401
3396check_cc <<EOF && enable attribute_packed3402check_cc <<EOF && enable attribute_packed
3397struct { int x; } __attribute__((packed)) x;3403struct { int x; } __attribute__((packed)) x;
3398EOF3404EOF
libavutil/internal.h+8−0
@@ -61,6 +61,14 @@ · 60 unmodified lines
61# define av_export61# define av_export
62#endif62#endif
63 63
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
64#ifndef INT_BIT72#ifndef INT_BIT
65# define INT_BIT (CHAR_BIT * sizeof(int))73# define INT_BIT (CHAR_BIT * sizeof(int))
66#endif74#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