diff --git a/include/xgboost/json.h b/include/xgboost/json.h index 4c4bafb1a..68a8a6712 100644 --- a/include/xgboost/json.h +++ b/include/xgboost/json.h @@ -250,7 +250,7 @@ class JsonNull : public Value { public: JsonNull() : Value(ValueKind::kNull) {} JsonNull(std::nullptr_t) : Value(ValueKind::kNull) {} // NOLINT - JsonNull(JsonNull&& that) : Value(ValueKind::kNull) {} + JsonNull(JsonNull&&) : Value(ValueKind::kNull) {} void Save(JsonWriter* writer) override; diff --git a/include/xgboost/metric.h b/include/xgboost/metric.h index faca15504..b1d69b99a 100644 --- a/include/xgboost/metric.h +++ b/include/xgboost/metric.h @@ -34,7 +34,7 @@ class Metric : public Configurable { * \param args arguments to the objective function. */ virtual void Configure( - const std::vector >& args) {} + const std::vector >&) {} /*! * \brief Load configuration from JSON object * By default, metric has no internal configuration; diff --git a/src/tree/updater_histmaker.cc b/src/tree/updater_histmaker.cc index c4fdbe3c0..6deb42113 100644 --- a/src/tree/updater_histmaker.cc +++ b/src/tree/updater_histmaker.cc @@ -146,7 +146,7 @@ class HistMaker: public BaseMaker { const std::vector &fset, const RegTree &tree) = 0; // initialize the current working set of features in this round - virtual void InitWorkSet(DMatrix *p_fmat, + virtual void InitWorkSet(DMatrix *, const RegTree &tree, std::vector *p_fset) { p_fset->resize(tree.param.num_feature); diff --git a/src/tree/updater_quantile_hist.cc b/src/tree/updater_quantile_hist.cc index 61cc0f562..f22e0d5cd 100644 --- a/src/tree/updater_quantile_hist.cc +++ b/src/tree/updater_quantile_hist.cc @@ -127,12 +127,12 @@ bool QuantileHistMaker::UpdatePredictionCache( template void BatchHistSynchronizer::SyncHistograms(BuilderT *builder, - int starting_index, - int sync_count, + int, + int, RegTree *p_tree) { builder->builder_monitor_.Start("SyncHistograms"); const size_t nbins = builder->hist_builder_.GetNumBins(); - common::BlockedSpace2d space(builder->nodes_for_explicit_hist_build_.size(), [&](size_t node) { + common::BlockedSpace2d space(builder->nodes_for_explicit_hist_build_.size(), [&](size_t) { return nbins; }, 1024); @@ -159,7 +159,7 @@ void DistributedHistSynchronizer::SyncHistograms(BuilderT* builder RegTree *p_tree) { builder->builder_monitor_.Start("SyncHistograms"); const size_t nbins = builder->hist_builder_.GetNumBins(); - common::BlockedSpace2d space(builder->nodes_for_explicit_hist_build_.size(), [&](size_t node) { + common::BlockedSpace2d space(builder->nodes_for_explicit_hist_build_.size(), [&](size_t) { return nbins; }, 1024); common::ParallelFor2d(space, builder->nthread_, [&](size_t node, common::Range1d r) { @@ -188,7 +188,7 @@ void DistributedHistSynchronizer::SyncHistograms(BuilderT* builder ParallelSubtractionHist(builder, space, builder->nodes_for_explicit_hist_build_, p_tree); - common::BlockedSpace2d space2(builder->nodes_for_subtraction_trick_.size(), [&](size_t node) { + common::BlockedSpace2d space2(builder->nodes_for_subtraction_trick_.size(), [&](size_t) { return nbins; }, 1024); ParallelSubtractionHist(builder, space2, builder->nodes_for_subtraction_trick_, p_tree); @@ -219,7 +219,7 @@ template void BatchHistRowsAdder::AddHistRows(BuilderT *builder, int *starting_index, int *sync_count, - RegTree *p_tree) { + RegTree *) { builder->builder_monitor_.Start("AddHistRows"); for (auto const& entry : builder->nodes_for_explicit_hist_build_) {