From 44bf4baead3950a1db5c9aad3c3d4d49a3273673 Mon Sep 17 00:00:00 2001 From: David Wendt <45795991+davidwendt@users.noreply.github.com> Date: Tue, 24 Aug 2021 20:52:48 -0400 Subject: [PATCH] Fix compile warnings found using nvcc 11.4 (#9101) While looking into a `compute-sanitizer` issue, I found the problem with the tool had been fixed in 11.4. Building libcudf in 11.4 uncovered some new compile warnings which are fixed in this PR. All the warnings were identifying unused variables. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Vyas Ramasubramani (https://github.com/vyasr) - Mark Harris (https://github.com/harrism) URL: https://github.com/rapidsai/cudf/pull/9101 --- cpp/src/binaryop/compiled/binary_ops.cu | 3 +-- cpp/src/io/orc/reader_impl.cu | 2 -- cpp/src/merge/merge.cu | 9 ++++----- cpp/tests/join/conditional_join_tests.cu | 4 +--- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/cpp/src/binaryop/compiled/binary_ops.cu b/cpp/src/binaryop/compiled/binary_ops.cu index 2b38224864a..7b0139a0082 100644 --- a/cpp/src/binaryop/compiled/binary_ops.cu +++ b/cpp/src/binaryop/compiled/binary_ops.cu @@ -43,7 +43,7 @@ struct scalar_as_column_device_view { template ())>* = nullptr> return_type operator()(scalar const& s, rmm::cuda_stream_view stream, - rmm::mr::device_memory_resource* mr) + rmm::mr::device_memory_resource*) { auto& h_scalar_type_view = static_cast&>(const_cast(s)); auto col_v = @@ -201,7 +201,6 @@ struct null_considering_binop { rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr) const { - std::unique_ptr out; // Create device views for inputs auto const lhs_dev_view = get_device_view(lhs); auto const rhs_dev_view = get_device_view(rhs); diff --git a/cpp/src/io/orc/reader_impl.cu b/cpp/src/io/orc/reader_impl.cu index 1b78d8b8585..83be58f5e56 100644 --- a/cpp/src/io/orc/reader_impl.cu +++ b/cpp/src/io/orc/reader_impl.cu @@ -176,7 +176,6 @@ size_t gather_stream_info(const size_t stripe_index, const orc::StripeInformation* stripeinfo, const orc::StripeFooter* stripefooter, const std::vector& orc2gdf, - const std::vector& gdf2orc, const std::vector types, bool use_index, size_t* num_dictionary_entries, @@ -1203,7 +1202,6 @@ table_with_metadata reader::impl::read(size_type skip_rows, stripe_info, stripe_footer, _col_meta.orc_col_map[level], - selected_columns, _metadata->get_types(), use_index, &num_dict_entries, diff --git a/cpp/src/merge/merge.cu b/cpp/src/merge/merge.cu index 38025a8a0ed..147db2fdfe7 100644 --- a/cpp/src/merge/merge.cu +++ b/cpp/src/merge/merge.cu @@ -225,11 +225,10 @@ struct column_merger { explicit column_merger(index_vector const& row_order) : row_order_(row_order) {} template ())> - std::unique_ptr operator()( - column_view const& lcol, - column_view const& rcol, - rmm::cuda_stream_view stream, - rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) const + std::unique_ptr operator()(column_view const&, + column_view const&, + rmm::cuda_stream_view, + rmm::mr::device_memory_resource*) const { CUDF_FAIL("Unsupported type for merge."); } diff --git a/cpp/tests/join/conditional_join_tests.cu b/cpp/tests/join/conditional_join_tests.cu index 8018d613e05..d566d2086bb 100644 --- a/cpp/tests/join/conditional_join_tests.cu +++ b/cpp/tests/join/conditional_join_tests.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, NVIDIA CORPORATION. + * Copyright (c) 2019-2021, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,8 +44,6 @@ constexpr cudf::size_type JoinNoneValue = // Common column references. const auto col_ref_left_0 = cudf::ast::column_reference(0, cudf::ast::table_reference::LEFT); const auto col_ref_right_0 = cudf::ast::column_reference(0, cudf::ast::table_reference::RIGHT); -const auto col_ref_left_1 = cudf::ast::column_reference(1, cudf::ast::table_reference::LEFT); -const auto col_ref_right_1 = cudf::ast::column_reference(1, cudf::ast::table_reference::RIGHT); // Common expressions. auto left_zero_eq_right_zero =