mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
Ignore function pointer cast warnings
Use GCC pragmas as these warnings are enabled by -Wpedantic and there's no way to disable them selectively.
This commit is contained in:
12
libxml.h
12
libxml.h
@@ -60,6 +60,18 @@ int vfprintf(FILE *, const char *, va_list);
|
||||
#include "trio.h"
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || \
|
||||
(defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406))
|
||||
#define XML_IGNORE_PEDANTIC_WARNINGS \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wpedantic\"")
|
||||
#define XML_POP_WARNINGS \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
#else
|
||||
#define XML_IGNORE_PEDANTIC_WARNINGS
|
||||
#define XML_POP_WARNINGS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Internal variable indicating if a callback has been registered for
|
||||
* node creation/destruction. It avoids spending a lot of time in locking
|
||||
|
Reference in New Issue
Block a user