diff --git a/src/iceberg/encryption/key_management_client.h b/src/iceberg/encryption/key_management_client.h index 6d8c087b4..8044d4a2a 100644 --- a/src/iceberg/encryption/key_management_client.h +++ b/src/iceberg/encryption/key_management_client.h @@ -54,7 +54,7 @@ class ICEBERG_EXPORT KeyManagementClient { /// \brief Initialize the client with the catalog properties. virtual Status Initialize( - const std::unordered_map& properties) { + const std::unordered_map& /*properties*/) { return {}; } @@ -72,7 +72,7 @@ class ICEBERG_EXPORT KeyManagementClient { virtual bool SupportsKeyGeneration() const { return false; } /// \brief Generate a new key in the KMS, returned in plain and wrapped form. - virtual Result GenerateKey(std::string_view wrapping_key_id) { + virtual Result GenerateKey(std::string_view /*wrapping_key_id*/) { return NotSupported("Key generation is not supported by this KMS client"); } }; diff --git a/src/iceberg/expression/binder.cc b/src/iceberg/expression/binder.cc index 52dede277..3b3897f40 100644 --- a/src/iceberg/expression/binder.cc +++ b/src/iceberg/expression/binder.cc @@ -120,22 +120,22 @@ Result> IsBoundVisitor::Or(const std::optional& left_r } Result> IsBoundVisitor::Predicate( - const std::shared_ptr& pred) { + const std::shared_ptr& /*pred*/) { return true; } Result> IsBoundVisitor::Predicate( - const std::shared_ptr& pred) { + const std::shared_ptr& /*pred*/) { return false; } Result> IsBoundVisitor::Aggregate( - const std::shared_ptr& aggregate) { + const std::shared_ptr& /*aggregate*/) { return true; } Result> IsBoundVisitor::Aggregate( - const std::shared_ptr& aggregate) { + const std::shared_ptr& /*aggregate*/) { return false; } diff --git a/src/iceberg/expression/expression.h b/src/iceberg/expression/expression.h index 43e4a2c1f..63dc7ef2e 100644 --- a/src/iceberg/expression/expression.h +++ b/src/iceberg/expression/expression.h @@ -77,7 +77,7 @@ class ICEBERG_EXPORT Expression : public util::Formattable { /// \brief Returns whether this expression will accept the same values as another. /// \param other another expression /// \return true if the expressions are equivalent - virtual bool Equals(const Expression& other) const { + virtual bool Equals(const Expression& /*other*/) const { // only bound predicates can be equivalent return false; } diff --git a/src/iceberg/expression/expression_visitor.h b/src/iceberg/expression/expression_visitor.h index 27cfb99c1..16c3e362e 100644 --- a/src/iceberg/expression/expression_visitor.h +++ b/src/iceberg/expression/expression_visitor.h @@ -117,13 +117,13 @@ class ICEBERG_EXPORT BoundVisitor : public ExpressionVisitor { /// \brief Visit an IS_NAN bound expression. /// \param expr The bound expression being tested - virtual Result IsNaN(const std::shared_ptr& expr) { + virtual Result IsNaN(const std::shared_ptr& /*expr*/) { return NotSupported("IsNaN operation is not supported by this visitor"); } /// \brief Visit a NOT_NAN bound expression. /// \param expr The bound expression being tested - virtual Result NotNaN(const std::shared_ptr& expr) { + virtual Result NotNaN(const std::shared_ptr& /*expr*/) { return NotSupported("NotNaN operation is not supported by this visitor"); } diff --git a/src/iceberg/expression/expressions.cc b/src/iceberg/expression/expressions.cc index 4b0e538ae..8a4505c17 100644 --- a/src/iceberg/expression/expressions.cc +++ b/src/iceberg/expression/expressions.cc @@ -292,7 +292,8 @@ std::shared_ptr Expressions::Ref(std::string name) { return ref; } -Literal Expressions::Lit(Literal::Value value, std::shared_ptr type) { +Literal Expressions::Lit(Literal::Value /*value*/, + std::shared_ptr /*type*/) { throw ExpressionError("Literal creation is not implemented"); } diff --git a/src/iceberg/expression/literal.cc b/src/iceberg/expression/literal.cc index c8dd74a44..c3891bcd0 100644 --- a/src/iceberg/expression/literal.cc +++ b/src/iceberg/expression/literal.cc @@ -528,7 +528,7 @@ Result LiteralCaster::CastFromBinary( switch (target_type->type_id()) { case TypeId::kFixed: { auto target_fixed_type = internal::checked_pointer_cast(target_type); - if (binary_val.size() == target_fixed_type->length()) { + if (binary_val.size() == static_cast(target_fixed_type->length())) { return Literal::Fixed(std::move(binary_val)); } return InvalidArgument("Failed to cast Binary with length {} to Fixed({})", @@ -802,8 +802,8 @@ bool Literal::IsAboveMax() const { return std::holds_alternative(value bool Literal::IsNull() const { return std::holds_alternative(value_); } bool Literal::IsNaN() const { - return std::holds_alternative(value_) && std::isnan(std::get(value_)) || - std::holds_alternative(value_) && std::isnan(std::get(value_)); + return (std::holds_alternative(value_) && std::isnan(std::get(value_))) || + (std::holds_alternative(value_) && std::isnan(std::get(value_))); } // LiteralCaster implementation diff --git a/src/iceberg/expression/manifest_evaluator.cc b/src/iceberg/expression/manifest_evaluator.cc index bc7d0bfe6..3042b5233 100644 --- a/src/iceberg/expression/manifest_evaluator.cc +++ b/src/iceberg/expression/manifest_evaluator.cc @@ -187,7 +187,8 @@ class ManifestEvalVisitor : public BoundVisitor { return kRowsMightMatch; } - Result NotEq(const std::shared_ptr& expr, const Literal& lit) override { + Result NotEq(const std::shared_ptr& /*expr*/, + const Literal& /*lit*/) override { // because the bounds are not necessarily a min or max value, this cannot be answered // using them. notEq(col, X) with (X, Y) doesn't guarantee that X is a value in col. return kRowsMightMatch; @@ -222,8 +223,8 @@ class ManifestEvalVisitor : public BoundVisitor { return kRowsMightMatch; } - Result NotIn(const std::shared_ptr& expr, - const BoundSetPredicate::LiteralSet& literal_set) override { + Result NotIn(const std::shared_ptr& /*expr*/, + const BoundSetPredicate::LiteralSet& /*literal_set*/) override { // because the bounds are not necessarily a min or max value, this cannot be answered // using them. notIn(col, {X, ...}) with (X, Y) doesn't guarantee that X is a value in // col. diff --git a/src/iceberg/expression/projections.cc b/src/iceberg/expression/projections.cc index dd83ef801..e332431be 100644 --- a/src/iceberg/expression/projections.cc +++ b/src/iceberg/expression/projections.cc @@ -44,7 +44,7 @@ class ProjectionVisitor : public ExpressionVisitor> Result> AlwaysFalse() override { return False::Instance(); } Result> Not( - const std::shared_ptr& child_result) override { + const std::shared_ptr& /*child_result*/) override { return InvalidExpression("Project called on expression with a not"); } diff --git a/src/iceberg/file_io.h b/src/iceberg/file_io.h index 4dd96530d..99d0588ac 100644 --- a/src/iceberg/file_io.h +++ b/src/iceberg/file_io.h @@ -165,7 +165,7 @@ class ICEBERG_EXPORT FileIO { /// /// \param file_location The location of the file to delete. /// \return void if the delete succeeded, an error code if the delete failed. - virtual Status DeleteFile(const std::string& file_location) { + virtual Status DeleteFile(const std::string& /*file_location*/) { return NotImplemented("DeleteFile not implemented"); } diff --git a/src/iceberg/util/executor_util_internal.h b/src/iceberg/util/executor_util_internal.h index f41b8ad3d..c64879413 100644 --- a/src/iceberg/util/executor_util_internal.h +++ b/src/iceberg/util/executor_util_internal.h @@ -216,9 +216,10 @@ auto ParallelCollect(OptionalExecutor executor, Args&&... args) { return {}; }); } else { - group.Submit([&, item = std::move(item)]() mutable -> Status { + group.Submit([&, moved_item = std::move(item)]() mutable -> Status { ICEBERG_ASSIGN_OR_RAISE( - value, std::invoke(std::get(args_tuple), std::move(item))); + value, + std::invoke(std::get(args_tuple), std::move(moved_item))); return {}; }); }