diff options
author | Alex Smith <alex.smith@warpsharp.info> | 2013-09-19 16:58:21 -0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-09-20 14:40:06 +0300 |
commit | 09f2581dc5edb3642858d69d9a70b67e249167e9 (patch) | |
tree | 3d420649016ebb804f218bbf6f9657d8c9cf5646 /libavutil/internal.h | |
parent | 5532ee6d7d554bb54d4374d0b69f72bc9ab9fd91 (diff) | |
download | ffmpeg-09f2581dc5edb3642858d69d9a70b67e249167e9.tar.gz |
msvc/icl: Use __declspec(deprecated)
Prior to this on msvc/icl there was no handling of deprecated functions
and the deprecated warning was disabled.
After enabling there are a number of warnings relating to the CRT and
the use of the non-secure versions of several functions. Defining
_CRT_SECURE_NO_WARNINGS silences these warnings.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r-- | libavutil/internal.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index b18860f084..7b178c25ae 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -62,8 +62,16 @@ #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\"") +# if defined(__ICL) +# define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:1478)) +# define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop)) +# elif defined(_MSC_VER) +# 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\"") +# endif #else # define FF_DISABLE_DEPRECATION_WARNINGS # define FF_ENABLE_DEPRECATION_WARNINGS |