From 199aff8e6d0414a4bceedc502954b8e9cfe9ec18 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 6 Feb 2016 23:34:00 +0000 Subject: Correctly annotate unused variables with a macro --- src/utils.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index a46946a..c9dfd36 100644 --- a/src/utils.h +++ b/src/utils.h @@ -41,6 +41,13 @@ int genb_fclose_tmp(FILE *filef, const char *fname); char *strndup(const char *s, size_t n); #endif -#define SLEN(x) (sizeof((x)) - 1) +#ifndef SLEN +/* Calculate length of a string constant */ +#define SLEN(s) (sizeof((s)) - 1) /* -1 for '\0' */ +#endif + +#ifndef UNUSED +#define UNUSED(x) ((void)(x)) +#endif #endif -- cgit v1.2.3