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

@@ -167,7 +167,7 @@ double GetMultiMetricEval(xgboost::Metric* metric,
info.weights_.HostVector() = weights;
info.group_ptr_ = groups;
return metric->Eval(preds, info, false);
return metric->Eval(preds, info);
}
namespace xgboost {
@@ -653,8 +653,6 @@ class RMMAllocator {};
void DeleteRMMResource(RMMAllocator* r) {}
RMMAllocatorPtr SetUpRMMResourceForCppTests(int argc, char** argv) {
return {nullptr, DeleteRMMResource};
}
RMMAllocatorPtr SetUpRMMResourceForCppTests(int, char**) { return {nullptr, DeleteRMMResource}; }
#endif // !defined(XGBOOST_USE_RMM) || XGBOOST_USE_RMM != 1
} // namespace xgboost