mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
Visual Studio builds: Allow silencing deprecation warnings
Define XML_IGNORE_DEPRECATION_WARNINGS and the corresponding XML_POP_WARNINGS for Visual Studio, and consequently define XML_IGNORE_FPTR_CAST_WARNINGS so that we do not get a compiler warning on Visual Studio by doing a __pragma(warning(pop)) without a corresponding __pragma(warning(push)). Also correct the documentation a bit for XML_POP_WARNINGS.
This commit is contained in:
@@ -68,6 +68,10 @@
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
#elif defined (_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS \
|
||||
__pragma(warning(push)) \
|
||||
__pragma(warning(disable : 4996))
|
||||
#else
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user