Skip to content

Commit 178b49b

Browse files
authored
Fix compiler warnings. (dmlc#11226)
1 parent 88c8d1a commit 178b49b

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/collective/comm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ class Channel {
159159
public:
160160
explicit Channel(Comm const& comm, std::shared_ptr<TCPSocket> sock)
161161
: sock_{std::move(sock)}, comm_{comm} {}
162+
virtual ~Channel() = default;
162163

163164
[[nodiscard]] virtual Result SendAll(std::int8_t const* ptr, std::size_t n) {
164165
Loop::Op op{Loop::Op::kWrite, comm_.Rank(), const_cast<std::int8_t*>(ptr), n, sock_.get(), 0};

src/common/ranking_utils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ bool IsBinaryRel(linalg::VectorView<float const> label, AllOf all_of) {
380380
*/
381381
template <typename AllOf>
382382
void CheckPreLabels(StringView name, linalg::VectorView<float const> label, AllOf all_of) {
383-
auto s_label = label.Values();
384383
auto is_binary = IsBinaryRel(label, all_of);
385384
CHECK(is_binary) << name << " can only be used with binary labels.";
386385
}

src/data/extmem_quantile_dmatrix.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,15 @@ void ExtMemQuantileDMatrix::InitFromCUDA(
148148
BatchSet<EllpackPage> ExtMemQuantileDMatrix::GetEllpackBatches(Context const *,
149149
const BatchParam &) {
150150
common::AssertGPUSupport();
151-
auto batch_set =
152-
std::visit([this](auto &&ptr) { return BatchSet{BatchIterator<EllpackPage>{ptr}}; },
153-
this->ellpack_page_source_);
151+
auto batch_set = std::visit([](auto &&ptr) { return BatchSet{BatchIterator<EllpackPage>{ptr}}; },
152+
this->ellpack_page_source_);
154153
return batch_set;
155154
}
156155

157156
BatchSet<EllpackPage> ExtMemQuantileDMatrix::GetEllpackPageImpl() {
158157
common::AssertGPUSupport();
159-
auto batch_set =
160-
std::visit([this](auto &&ptr) { return BatchSet{BatchIterator<EllpackPage>{ptr}}; },
161-
this->ellpack_page_source_);
158+
auto batch_set = std::visit([](auto &&ptr) { return BatchSet{BatchIterator<EllpackPage>{ptr}}; },
159+
this->ellpack_page_source_);
162160
return batch_set;
163161
}
164162
#endif

0 commit comments

Comments
 (0)