1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-11 05:17:37 +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:
Rosen Penev 2024-06-16 20:02:45 -07:00
parent bbbbbb4649
commit 5d542feff1
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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