From 9a55136bfb67d8257d2d896df677a725180d88ef Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Tue, 20 Nov 2018 09:14:48 -0800 Subject: [PATCH] implement __UNUSED__ macro for marking unused Implement __UNUSED__ macro for marking symbols unused safely. Partially resolves ipmitool/ipmitool#13 Signed-off-by: Patrick Venture --- include/ipmitool/helper.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/ipmitool/helper.h b/include/ipmitool/helper.h index 1a464a8..ed8e950 100644 --- a/include/ipmitool/helper.h +++ b/include/ipmitool/helper.h @@ -52,6 +52,12 @@ #define tboolean int #endif +#ifdef __GNUC__ + #define __UNUSED__(x) x __attribute__((unused)) +#else + #define __UNUSED__(x) x +#endif + /* IPMI spec. - UID 0 reserved, 63 maximum UID which can be used */ #ifndef IPMI_UID_MIN # define IPMI_UID_MIN 1