From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> clang-5 needs this to compile without warnings. Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- util/symver.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/util/symver.h b/util/symver.h index e739b5a11cc2ac..ae413050650e0f 100644 --- a/util/symver.h +++ b/util/symver.h @@ -88,11 +88,13 @@ #else // Static linking, or linker does not support symbol versions -# define COMPAT_SYMVER_FUNC(_public_sym, _uniq, _ver_str, _ret, ...) \ - static inline _ret __##_public_sym##_##_uniq(__VA_ARGS__) -# define LATEST_SYMVER_FUNC(_public_sym, _uniq, _ver_str, _ret, ...) \ - static _ret __##_public_sym##_##_uniq(__VA_ARGS__) \ - __attribute__((alias(stringify(_public_sym)))); \ +#define COMPAT_SYMVER_FUNC(_public_sym, _uniq, _ver_str, _ret, ...) \ + static inline __attribute__((unused)) \ + _ret __##_public_sym##_##_uniq(__VA_ARGS__) +#define LATEST_SYMVER_FUNC(_public_sym, _uniq, _ver_str, _ret, ...) \ + static __attribute__((unused)) \ + _ret __##_public_sym##_##_uniq(__VA_ARGS__) \ + __attribute__((alias(stringify(_public_sym)))); \ extern _ret _public_sym(__VA_ARGS__) #endif -- 2.19.0