diff --git a/cpp/include/cudf/ast/expressions.hpp b/cpp/include/cudf/ast/expressions.hpp index bcc9ad1b391..85289a52831 100644 --- a/cpp/include/cudf/ast/expressions.hpp +++ b/cpp/include/cudf/ast/expressions.hpp @@ -612,19 +612,19 @@ class tree { * @brief get the first expression in the tree * @returns the first inserted expression into the tree */ - expression const& front() const { return *expressions.front(); } + [[nodiscard]] expression const& front() const { return *expressions.front(); } /** * @brief get the last expression in the tree * @returns the last inserted expression into the tree */ - expression const& back() const { return *expressions.back(); } + [[nodiscard]] expression const& back() const { return *expressions.back(); } /** * @brief get the number of expressions added to the tree * @returns the number of expressions added to the tree */ - size_t size() const { return expressions.size(); } + [[nodiscard]] size_t size() const { return expressions.size(); } /** * @brief get the expression at an index in the tree. Index is checked. diff --git a/cpp/src/io/json/parser_features.cpp b/cpp/src/io/json/parser_features.cpp index 401a6e992de..e795e8e09d8 100644 --- a/cpp/src/io/json/parser_features.cpp +++ b/cpp/src/io/json/parser_features.cpp @@ -109,7 +109,7 @@ struct allnull_column_functor { rmm::device_async_resource_ref mr; private: - auto make_zeroed_offsets(size_type size) const + [[nodiscard]] auto make_zeroed_offsets(size_type size) const { auto offsets_buff = cudf::detail::make_zeroed_device_uvector_async(size + 1, stream, mr);