From 09f2581dc5edb3642858d69d9a70b67e249167e9 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Thu, 19 Sep 2013 16:58:21 -0400 Subject: msvc/icl: Use __declspec(deprecated) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavutil/internal.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libavutil/internal.h') 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 -- cgit v1.2.3