mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
dict: Fix warnings with older clang
This commit is contained in:
parent
8961056f9b
commit
12ce9b5ffe
11
libxml.h
11
libxml.h
@ -55,9 +55,14 @@
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
|
||||
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") \
|
||||
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
|
||||
#if __clang_major__ >= 12
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
|
||||
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") \
|
||||
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
|
||||
#else
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
|
||||
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
|
||||
#endif
|
||||
#else
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER
|
||||
#endif
|
||||
|
11
testdict.c
11
testdict.c
@ -7,9 +7,14 @@
|
||||
/**** dictionary tests ****/
|
||||
|
||||
#ifdef __clang__
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
|
||||
__attribute__ ((no_sanitize("unsigned-integer-overflow"))) \
|
||||
__attribute__ ((no_sanitize("unsigned-shift-base")))
|
||||
#if __clang_major__ >= 12
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
|
||||
__attribute__ ((no_sanitize("unsigned-integer-overflow"))) \
|
||||
__attribute__ ((no_sanitize("unsigned-shift-base")))
|
||||
#else
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
|
||||
__attribute__ ((no_sanitize("unsigned-integer-overflow")))
|
||||
#endif
|
||||
#else
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user