diff options
author | Vincent Sanders <vince@kyllikki.org> | 2016-02-06 23:34:00 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2016-02-06 23:34:00 +0000 |
commit | 199aff8e6d0414a4bceedc502954b8e9cfe9ec18 (patch) | |
tree | 0e37bb340c41ee73576ee16fa4269404fa61228e /src/utils.h | |
parent | 66e9aa8d66aae27098693554d26100417606164b (diff) | |
download | nsgenbind-199aff8e6d0414a4bceedc502954b8e9cfe9ec18.tar.gz nsgenbind-199aff8e6d0414a4bceedc502954b8e9cfe9ec18.tar.bz2 |
Correctly annotate unused variables with a macro
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 9 |
1 files changed, 8 insertions, 1 deletions
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 |