Fix compiler warnings. (#7974)

- Remove unused parameters. There are still many warnings that are not yet
addressed. Currently, the warnings in dmlc-core dominate the error log.
- Remove `distributed` parameter from metric.
- Fixes some warnings about signed comparison.
This commit is contained in:
Jiaming Yuan
2022-06-06 22:56:25 +08:00
committed by GitHub
parent d48123d23b
commit 1a33b50a0d
46 changed files with 149 additions and 189 deletions

View File

@@ -94,8 +94,8 @@ TEST(GPUFeatureInteractionConstraint, Init) {
tree::TrainParam param = GetParameter();
param.interaction_constraints = R"([[0, 1, 3], [3, 5, 6]])";
FConstraintWrapper constraints(param, kFeatures);
std::vector<int32_t> h_sets {0, 0, 0, 1, 1, 1};
std::vector<int32_t> h_sets_ptr {0, 1, 2, 2, 4, 4, 5, 6};
std::vector<bst_feature_t> h_sets {0, 0, 0, 1, 1, 1};
std::vector<size_t> h_sets_ptr {0, 1, 2, 2, 4, 4, 5, 6};
auto d_sets = constraints.GetDSets();
ASSERT_EQ(h_sets.size(), d_sets.size());
auto d_sets_ptr = constraints.GetDSetsPtr();