mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
libxml: define ATTRIBUTE_UNUSED for clang
Silences warnings under Clang on Windows. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207
|
||||
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207 || defined(__clang__)
|
||||
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
#else
|
||||
#define ATTRIBUTE_UNUSED
|
||||
|
2
libxml.h
2
libxml.h
@@ -47,7 +47,7 @@
|
||||
#define XML_HIDDEN
|
||||
#endif
|
||||
|
||||
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207
|
||||
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207 || defined(__clang__)
|
||||
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
#else
|
||||
#define ATTRIBUTE_UNUSED
|
||||
|
@@ -50,7 +50,7 @@
|
||||
* Repeated here since the definition is not available when
|
||||
* compiled outside the libxml2 build tree.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#ifdef ATTRIBUTE_UNUSED
|
||||
#undef ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user