mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
Use memcpy to avoid pointer cast warnings
This commit is contained in:
@@ -65,19 +65,22 @@
|
||||
* Macros to ignore deprecation warnings
|
||||
*/
|
||||
#if defined(__LCC__)
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS \
|
||||
_Pragma("diag_suppress 1215")
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS _Pragma("diag_suppress 1215")
|
||||
#define XML_POP_WARNINGS _Pragma("diag_default 1215")
|
||||
#elif defined(__clang__) || \
|
||||
(defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406))
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS \
|
||||
(defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406))
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
#define XML_POP_WARNINGS _Pragma("GCC diagnostic pop")
|
||||
#elif defined (_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS \
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS \
|
||||
__pragma(warning(push)) \
|
||||
__pragma(warning(disable : 4996))
|
||||
#define XML_POP_WARNINGS __pragma(warning(pop))
|
||||
#else
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS
|
||||
#define XML_IGNORE_DEPRECATION_WARNINGS
|
||||
#define XML_POP_WARNINGS
|
||||
#endif
|
||||
|
||||
#define PyxmlNode_Get(v) (((v) == Py_None) ? NULL : \
|
||||
|
@@ -112,9 +112,8 @@ libxml_PyFileGet(PyObject *f) {
|
||||
|
||||
if (hntdll == NULL)
|
||||
return(NULL);
|
||||
XML_IGNORE_FPTR_CAST_WARNINGS
|
||||
NtQueryInformationFile = (t_NtQueryInformationFile)GetProcAddress(hntdll, "NtQueryInformationFile");
|
||||
XML_POP_WARNINGS
|
||||
NtQueryInformationFile = (t_NtQueryInformationFile) (void (*)(void))
|
||||
GetProcAddress(hntdll, "NtQueryInformationFile");
|
||||
|
||||
if (NtQueryInformationFile != NULL &&
|
||||
(NtQueryInformationFile((HANDLE)w_fh,
|
||||
|
Reference in New Issue
Block a user