提交 f062f025 编写于 作者: I Ilya Dryomov

libceph: add __maybe_unused to DEFINE_CEPH_FEATURE

Avoid -Wunused-const-variable warnings for "make W=1".
Reported-by: NLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
Reviewed-by: NLeon Romanovsky <leonro@nvidia.com>
上级 d012a719
......@@ -11,14 +11,14 @@
#define CEPH_FEATURE_INCARNATION_2 (1ull<<57) // CEPH_FEATURE_SERVER_JEWEL
#define DEFINE_CEPH_FEATURE(bit, incarnation, name) \
static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
static const uint64_t CEPH_FEATUREMASK_##name = \
static const uint64_t __maybe_unused CEPH_FEATURE_##name = (1ULL<<bit); \
static const uint64_t __maybe_unused CEPH_FEATUREMASK_##name = \
(1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation);
/* this bit is ignored but still advertised by release *when* */
#define DEFINE_CEPH_FEATURE_DEPRECATED(bit, incarnation, name, when) \
static const uint64_t DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \
static const uint64_t DEPRECATED_CEPH_FEATUREMASK_##name = \
static const uint64_t __maybe_unused DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \
static const uint64_t __maybe_unused DEPRECATED_CEPH_FEATUREMASK_##name = \
(1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation);
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册