Get rid of a few trivial compiler warnings. (#4312)

This commit is contained in:
Hajime Morrita
2019-03-30 09:02:29 -07:00
committed by Jiaming Yuan
parent ad4de0d718
commit 680a1b36f3
5 changed files with 4 additions and 6 deletions

View File

@@ -331,7 +331,6 @@ class BaseMaker: public TreeUpdater {
std::vector< std::vector<TStats> > *p_thread_temp,
std::vector<TStats> *p_node_stats) {
std::vector< std::vector<TStats> > &thread_temp = *p_thread_temp;
const MetaInfo &info = fmat.Info();
thread_temp.resize(omp_get_max_threads());
p_node_stats->resize(tree.param.num_nodes);
#pragma omp parallel

View File

@@ -245,7 +245,6 @@ class ColMaker: public TreeUpdater {
DMatrix *p_fmat,
const std::vector<GradientPair> &gpair) {
// TODO(tqchen): double check stats order.
const MetaInfo& info = p_fmat->Info();
const bool ind = col.size() != 0 && col[0].fvalue == col[col.size() - 1].fvalue;
bool need_forward = param_.NeedForwardSearch(p_fmat->GetColDensity(fid), ind);
bool need_backward = param_.NeedBackwardSearch(p_fmat->GetColDensity(fid), ind);

View File

@@ -140,7 +140,7 @@ class SketchMaker: public BaseMaker {
this->UpdateSketchCol(gpair, batch[fidx], tree,
node_stats_,
fidx,
batch[fidx].size() == nrows,
static_cast<size_t>(batch[fidx].size()) == nrows,
&thread_sketch_[omp_get_thread_num()]);
}
}