From: Nelson Ferreira Date: Sun, 27 Sep 2015 21:26:39 +0000 (-0400) Subject: Add SXE_SET_UNUSED to shut unused warnings. X-Git-Tag: v22.1.16~14^2~13 X-Git-Url: http://cgit.sxemacs.org/?p=sxemacs;a=commitdiff_plain;h=301c2aabd99739d5493b83bb71cb28e3dd5e8a48 Add SXE_SET_UNUSED to shut unused warnings. * src/sxe-utils.h (SXE_SET_UNUSED): Define macro to mark variables set but unused, aka, dummy vars. Signed-off-by: Nelson Ferreira --- diff --git a/src/sxe-utils.h b/src/sxe-utils.h index 2a6d166..60b526d 100644 --- a/src/sxe-utils.h +++ b/src/sxe-utils.h @@ -54,11 +54,17 @@ along with this program. If not, see . */ #else # define SXE_UNUSED(x) x #endif + #ifdef UNUSED #undef UNUSED #define UNUSED(x) SXE_UNUSED(x) #endif +#ifdef SXE_SET_UNUSED +#else +# define SXE_SET_UNUSED(x) ((void)(x)) +#endif + #ifdef WEAK_EXTERN #elif defined(__GNUC__) # define WEAK_EXTERN extern __attribute__((weak)) @@ -78,6 +84,7 @@ along with this program. If not, see . */ #else #define LIKELY(_x) __builtin_expect(!!(_x), 1) #endif + #ifdef UNLIKELY #else #define UNLIKELY(_x) __builtin_expect(!!(_x), 0)