1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-23 17:33:50 +03:00

include: Don't define ATTRIBUTE_UNUSED in public header

Stop polluting namespace with unprefixed names.
This commit is contained in:
Nick Wellnhofer 2024-06-15 19:13:08 +02:00
parent 387f0c784f
commit 208f27f964
11 changed files with 20 additions and 11 deletions

View File

@ -177,7 +177,7 @@ typedef struct gjob {
static gJobPtr
parseGjobFile(char *filename ATTRIBUTE_UNUSED) {
parseGjobFile(char *filename) {
xmlDocPtr doc;
gJobPtr ret;
jobPtr curjob;

View File

@ -15,6 +15,12 @@
extern "C" {
#endif
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207
#define ATTRIBUTE_UNUSED __attribute__((unused))
#else
#define ATTRIBUTE_UNUSED
#endif
#if defined(LIBXML_HTML_ENABLED)
#define HAVE_HTML_FUZZER
#endif

View File

@ -41,12 +41,6 @@
* Attributes
*/
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207
#define ATTRIBUTE_UNUSED __attribute__((unused))
#else
#define ATTRIBUTE_UNUSED
#endif
#if !defined(__clang__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
#define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
#else

View File

@ -47,6 +47,12 @@
#define XML_HIDDEN
#endif
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207
#define ATTRIBUTE_UNUSED __attribute__((unused))
#else
#define ATTRIBUTE_UNUSED
#endif
#if defined(__clang__) || \
(defined(__GNUC__) && (__GNUC__ >= 8) && !defined(__EDG__))
#define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))

View File

@ -6,7 +6,7 @@
* daniel@veillard.com
*/
#include "config.h"
#include "libxml.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -6,7 +6,7 @@
* daniel@veillard.com
*/
#include "config.h"
#include "libxml.h"
#include <stdio.h>
#include <libxml/xmlversion.h>

View File

@ -6,6 +6,7 @@
* joelwreed@comcast.net
*/
#include "libxml.h"
#include <stdio.h>
#include <libxml/xmlversion.h>

View File

@ -11,7 +11,7 @@
/* Disable deprecation warnings */
#define XML_DEPRECATED
#include "config.h"
#include "libxml.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -10,6 +10,7 @@
* daniel@veillard.com
*/
#include "libxml.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -4,6 +4,7 @@
* See Copyright for the status of this software.
*/
#include "libxml.h"
#include <libxml/parser.h>
#include <libxml/xmlreader.h>
#include <libxml/xmlwriter.h>

View File

@ -12,7 +12,7 @@
#define XML_DEPRECATED_MEMBER
#include "config.h"
#include "libxml.h"
#include <stdio.h>
#include <stdlib.h>