aboutsummaryrefslogtreecommitdiff
path: root/riscv/common.h
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2022-09-22 17:32:15 -0700
committerAndrew Waterman <andrew@sifive.com>2022-10-04 15:40:01 -0700
commitfe6335701815b302de391aac7177091c2ca3eb2e (patch)
tree6ad00c36bced0279204a21cdf6805d767e9b2e98 /riscv/common.h
parentae747db810ac59da81d6c5f055c04ed2a882aded (diff)
downloadspike-fe6335701815b302de391aac7177091c2ca3eb2e.zip
spike-fe6335701815b302de391aac7177091c2ca3eb2e.tar.gz
spike-fe6335701815b302de391aac7177091c2ca3eb2e.tar.bz2
Add UNUSED macro for suppressing unused-parameter/variable warnings
Diffstat (limited to 'riscv/common.h')
-rw-r--r--riscv/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/riscv/common.h b/riscv/common.h
index 7d37001..a354ced 100644
--- a/riscv/common.h
+++ b/riscv/common.h
@@ -9,12 +9,14 @@
# define NOINLINE __attribute__ ((noinline))
# define NORETURN __attribute__ ((noreturn))
# define ALWAYS_INLINE __attribute__ ((always_inline))
+# define UNUSED __attribute__ ((unused))
#else
# define likely(x) (x)
# define unlikely(x) (x)
# define NOINLINE
# define NORETURN
# define ALWAYS_INLINE
+# define UNUSED
#endif
#endif