diff --git a/dmlc-core b/dmlc-core index d8d4dccb8..c5c33124d 160000 --- a/dmlc-core +++ b/dmlc-core @@ -1 +1 @@ -Subproject commit d8d4dccb8bd89af9f57aa19e7523f0b755563ca4 +Subproject commit c5c33124d2cc4a30ce8409d881c945c5bb04d06e diff --git a/include/xgboost/gbm.h b/include/xgboost/gbm.h index 6766b0b8a..4cfb10422 100644 --- a/include/xgboost/gbm.h +++ b/include/xgboost/gbm.h @@ -161,7 +161,8 @@ struct GradientBoosterReg * \endcode */ #define XGBOOST_REGISTER_GBM(UniqueId, Name) \ - static ::xgboost::GradientBoosterReg & __make_ ## GradientBoosterReg ## _ ## UniqueId ## __ = \ + static DMLC_ATTRIBUTE_UNUSED ::xgboost::GradientBoosterReg & \ + __make_ ## GradientBoosterReg ## _ ## UniqueId ## __ = \ ::dmlc::Registry< ::xgboost::GradientBoosterReg>::Get()->__REGISTER__(Name) } // namespace xgboost diff --git a/include/xgboost/objective.h b/include/xgboost/objective.h index 732644dd5..ea5861664 100644 --- a/include/xgboost/objective.h +++ b/include/xgboost/objective.h @@ -105,7 +105,8 @@ struct ObjFunctionReg * \endcode */ #define XGBOOST_REGISTER_OBJECTIVE(UniqueId, Name) \ - static ::xgboost::ObjFunctionReg & __make_ ## ObjFunctionReg ## _ ## UniqueId ## __ = \ + static DMLC_ATTRIBUTE_UNUSED ::xgboost::ObjFunctionReg & \ + __make_ ## ObjFunctionReg ## _ ## UniqueId ## __ = \ ::dmlc::Registry< ::xgboost::ObjFunctionReg>::Get()->__REGISTER__(Name) } // namespace xgboost #endif // XGBOOST_OBJECTIVE_H_ diff --git a/include/xgboost/tree_updater.h b/include/xgboost/tree_updater.h index abbc7f3cb..1a233343b 100644 --- a/include/xgboost/tree_updater.h +++ b/include/xgboost/tree_updater.h @@ -82,7 +82,8 @@ struct TreeUpdaterReg * \endcode */ #define XGBOOST_REGISTER_TREE_UPDATER(UniqueId, Name) \ - static ::xgboost::TreeUpdaterReg& __make_ ## TreeUpdaterReg ## _ ## UniqueId ## __ = \ + static DMLC_ATTRIBUTE_UNUSED ::xgboost::TreeUpdaterReg& \ + __make_ ## TreeUpdaterReg ## _ ## UniqueId ## __ = \ ::dmlc::Registry< ::xgboost::TreeUpdaterReg>::Get()->__REGISTER__(Name) } // namespace xgboost diff --git a/rabit b/rabit index 2dd7476ad..a9a2a69dc 160000 --- a/rabit +++ b/rabit @@ -1 +1 @@ -Subproject commit 2dd7476ad7e4afe97eb579d39aab226ff74400a6 +Subproject commit a9a2a69dc1144180a43f7d2d1097264482be7817 diff --git a/src/c_api/c_api.cc b/src/c_api/c_api.cc index 03ec0e42e..cfe8679c2 100644 --- a/src/c_api/c_api.cc +++ b/src/c_api/c_api.cc @@ -736,4 +736,4 @@ XGB_DLL int XGBoosterSaveRabitCheckpoint(BoosterHandle handle) { } // force link rabit -static int XGBOOST_LINK_RABIT_C_API_ = RabitLinkTag(); +static DMLC_ATTRIBUTE_UNUSED int XGBOOST_LINK_RABIT_C_API_ = RabitLinkTag();