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>
This commit is contained in:
committed by
Martin Storsjö
parent
5532ee6d7d
commit
09f2581dc5
@@ -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
|
||||
|
Reference in New Issue
Block a user