GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBI / V0-1-1 > test_attribute / rhel5-64
Defines | |
#define | __attribute__(x) |
With non-GCC compilers, the __attribute__ feature is redefined as a NOP macro. With GCC compilers, this macro is not defined. | |
#define | ATTR_UNUSED_OK __attribute__((unused)) |
Symbol defined when using GCC compilers indicating that a static variable or static function is okay to be unused. |
CVS $Id: Attribute.h,v 1.3 2005/10/01 00:33:25 russell Exp $
static void my_unused_routine (void) __attribute__((unused));
static void my_unused_routine (void) ATTR_UNUSED_OK;
#define ATTR_UNUSED_OK __attribute__((unused)) |
Symbol defined when using GCC compilers indicating that a static variable or static function is okay to be unused.
With compiler warnings at their highest level, static variables and functions that are declared/defined but not used result in a warning message. Usually this is exactly what you want, it warns one of dead code or possible typos. However an include file that defines many static inlines can cause needless noise. It is unlikely that the user will need all the defined inlines, so some are bound to be unused.
Example:
static inline int foo (int bar) ATTR_UNUSED_OK;