diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-09-22 09:40:44 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-09-22 09:40:44 -0500 |
commit | ecd82b6def40960e168ccb3d4b19ce32fab2d989 (patch) | |
tree | 6b022d6f612c56cc4739301189e61813d18a5018 /cpukit/score/include/rtems/score/basedefs.h | |
parent | leon3/console.c: Fix misisng prototype issues (diff) | |
download | rtems-ecd82b6def40960e168ccb3d4b19ce32fab2d989.tar.bz2 |
basedefs.h: Add RTEMS_COMPILER_UNUSED_ATTRIBUTE.
Diffstat (limited to 'cpukit/score/include/rtems/score/basedefs.h')
-rw-r--r-- | cpukit/score/include/rtems/score/basedefs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h index 858ca93d27..082bfbddfd 100644 --- a/cpukit/score/include/rtems/score/basedefs.h +++ b/cpukit/score/include/rtems/score/basedefs.h @@ -184,6 +184,17 @@ #define RTEMS_COMPILER_DEPRECATED_ATTRIBUTE #endif +/** + * Instructs the compiler that a specific variable is deliberately unused. + * This can occur when reading volatile device memory or skipping arguments + * in a variable argument method. + */ +#if defined(__GNUC__) + #define RTEMS_COMPILER_UNUSED_ATTRIBUTE __attribute__((unused)) +#else + #define RTEMS_COMPILER_UNUSED_ATTRIBUTE +#endif + #if __cplusplus >= 201103L #define RTEMS_STATIC_ASSERT(cond, msg) \ static_assert(cond, # msg) |