mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
Refine UNUSED macro to avoid any side effect
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I35d858fc6fb2e0e24b993ab7dd2203c9dd35232a
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
|
||||
/* Indicate that a local variable is not used */
|
||||
|
||||
# define UNUSED(a) ((void)(a))
|
||||
# define UNUSED(a) ((void)(1 || (a)))
|
||||
|
||||
/* Built-in functions */
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
/* Indicate that a local variable is not used */
|
||||
|
||||
# define UNUSED(a) ((void)(a))
|
||||
# define UNUSED(a) ((void)(1 || (a)))
|
||||
|
||||
/* SDCC-specific definitions ************************************************/
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
|
||||
/* Indicate that a local variable is not used */
|
||||
|
||||
# define UNUSED(a) ((void)(a))
|
||||
# define UNUSED(a) ((void)(1 || (a)))
|
||||
|
||||
/* It is assumed that the system is build using the small
|
||||
* data model with storage defaulting to internal RAM.
|
||||
@@ -434,7 +434,7 @@
|
||||
|
||||
/* Indicate that a local variable is not used */
|
||||
|
||||
# define UNUSED(a) ((void)(a))
|
||||
# define UNUSED(a) ((void)(1 || (a)))
|
||||
|
||||
/* Zilog-specific definitions ***********************************************/
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
|
||||
/* Indicate that a local variable is not used */
|
||||
|
||||
# define UNUSED(a) ((void)(a))
|
||||
# define UNUSED(a) ((void)(1 || (a)))
|
||||
|
||||
/* ICCARM-specific definitions **********************************************/
|
||||
|
||||
@@ -575,7 +575,7 @@
|
||||
|
||||
/* Indicate that a local variable is not used */
|
||||
|
||||
# define UNUSED(a) ((void)(a))
|
||||
# define UNUSED(a) ((void)(1 || (a)))
|
||||
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_data __weak
|
||||
@@ -667,7 +667,7 @@
|
||||
# undef CONFIG_HAVE_ANONYMOUS_STRUCT
|
||||
# undef CONFIG_HAVE_ANONYMOUS_UNION
|
||||
|
||||
# define UNUSED(a) ((void)(a))
|
||||
# define UNUSED(a) ((void)(1 || (a)))
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user