nightingale/vendor/github.com/open-falcon/rrdlite/unused.h

15 lines
414 B
C
Raw Normal View History

2020-03-11 18:25:20 +08:00
/* define a macro to wrap variables that would
otherwise generate UNUSED variable warnings
Note that GCC's attribute unused only supresses the warning, so
it is perfectly safe to declare something unused although it is not.
*/
#ifdef UNUSED
#elif defined(__GNUC__)
# define UNUSED(x) x __attribute__((unused))
#elif defined(__LCLINT__)
# define UNUSED(x) /*@unused@*/ x
#else
# define UNUSED(x) x
#endif