mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 18:02:11 +00:00
Avoid corrupting diagnostic state with _Pragma changes.
The macros for ICC and MSVC correctly push and pop the diagnostic state of the compiler when disabling deprecation warnings. The ones for clang/gcc should do the same. Without this, if a blanket deprecation warning is applied to the code base it'll be flipped back on incorrectly with FF_ENABLE_DEPRECATION_WARNINGS. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
57a422ea4c
commit
01763144dc
@ -81,8 +81,8 @@
|
||||
# define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:4996))
|
||||
# define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop))
|
||||
# else
|
||||
# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
|
||||
# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic pop")
|
||||
# endif
|
||||
#else
|
||||
# define FF_DISABLE_DEPRECATION_WARNINGS
|
||||
|
Loading…
Reference in New Issue
Block a user