UNUSED: UNUSED may be defined elsewhere.

Give priority to using macros defined by third-party libraries

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
wangmingrong1 2025-05-13 20:41:57 +08:00 committed by Xiang Xiao
parent acf0256164
commit 66260f81f4

View file

@ -576,7 +576,9 @@
/* Indicate that a local variable is not used */
# define UNUSED(a) ((void)(1 || &(a)))
# ifndef UNUSED
# define UNUSED(a) ((void)(1 || &(a)))
# endif
# if defined(__clang__)
# define no_builtin(n) __attribute__((no_builtin(n)))
@ -708,7 +710,9 @@
/* Indicate that a local variable is not used */
# define UNUSED(a) ((void)(1 || &(a)))
# ifndef UNUSED
# define UNUSED(a) ((void)(1 || &(a)))
# endif
/* It is assumed that the system is build using the small
* data model with storage defaulting to internal RAM.
@ -901,7 +905,9 @@
/* Indicate that a local variable is not used */
# define UNUSED(a) ((void)(1 || &(a)))
# ifndef UNUSED
# define UNUSED(a) ((void)(1 || &(a)))
# endif
/* Older Zilog compilers support both types double and long long, but the
* size is 32-bits (same as long and single precision) so it is safer to say
@ -992,7 +998,9 @@
/* Indicate that a local variable is not used */
# define UNUSED(a) ((void)(1 || &(a)))
# ifndef UNUSED
# define UNUSED(a) ((void)(1 || &(a)))
# endif
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
@ -1088,7 +1096,9 @@
# undef CONFIG_LONG_IS_NOT_INT
# undef CONFIG_PTR_IS_NOT_INT
# define UNUSED(a) ((void)(1 || &(a)))
# ifndef UNUSED
# define UNUSED(a) ((void)(1 || &(a)))
# endif
# define offsetof(a, b) ((size_t)(&(((a *)(0))->b)))
# define return_address(x) 0
@ -1179,7 +1189,9 @@
# undef CONFIG_LONG_IS_NOT_INT
# undef CONFIG_PTR_IS_NOT_INT
# define UNUSED(a) ((void)(1 || &(a)))
# ifndef UNUSED
# define UNUSED(a) ((void)(1 || &(a)))
# endif
# define offsetof(a, b) ((size_t)(&(((a *)(0))->b)))
# define return_address(x) 0
@ -1261,7 +1273,9 @@
# undef CONFIG_HAVE_DOUBLE
# undef CONFIG_HAVE_LONG_DOUBLE
# define UNUSED(a) ((void)(1 || &(a)))
# ifndef UNUSED
# define UNUSED(a) ((void)(1 || &(a)))
# endif
# define offsetof(a, b) ((size_t)(&(((a *)(0))->b)))
# define return_address(x) 0