[PATCH rdma-core 4/8] Add __attribute__(unused) to the dummy symver macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux