From 73d66457cd8ebf3198f7d0d8d859f170b31e0edf Mon Sep 17 00:00:00 2001 From: clockblocker Date: Thu, 26 Nov 2026 07:12:40 +0100 Subject: [PATCH] Fix -Wextra warnings in ParserDefaultVal and move_from_tuple --- include/rfl/internal/move_from_tuple.hpp | 2 +- include/rfl/parsing/ParserDefaultVal.hpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/rfl/internal/move_from_tuple.hpp b/include/rfl/internal/move_from_tuple.hpp index c5edf9043..3855f7741 100644 --- a/include/rfl/internal/move_from_tuple.hpp +++ b/include/rfl/internal/move_from_tuple.hpp @@ -44,7 +44,7 @@ struct IndptrHelper { static constexpr auto indptr_ = ArrayType{_head, _tail...}; template - consteval auto operator+(const IndptrHelper<_is...>& _other) const { + consteval auto operator+(const IndptrHelper<_is...>&) const { constexpr auto last = std::get(indptr_); return IndptrHelper<_head, _tail..., (last + _is)...>{}; } diff --git a/include/rfl/parsing/ParserDefaultVal.hpp b/include/rfl/parsing/ParserDefaultVal.hpp index 9f11fea44..23620dfdb 100644 --- a/include/rfl/parsing/ParserDefaultVal.hpp +++ b/include/rfl/parsing/ParserDefaultVal.hpp @@ -64,8 +64,10 @@ struct ParserDefaultVal { static schema::Type to_schema( std::map* _definitions) { using U = std::remove_cvref_t; - return schema::Type{schema::Type::DefaultVal{Ref::make( - Parser::to_schema(_definitions))}}; + return schema::Type{schema::Type::DefaultVal{ + .type_ = Ref::make( + Parser::to_schema(_definitions)), + .default_value_ = std::nullopt}}; } };