Skip to content

Commit

Permalink
io/Iovec: drop unnecessary const from MakeIovecT()
Browse files Browse the repository at this point in the history
This can fix -Wuninitialized warnings with clang 18.
  • Loading branch information
MaxKellermann committed Jul 22, 2024
1 parent 5c3b5c8 commit 4efeaea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/io/Iovec.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MakeIovec(std::span<T> s) noexcept

template<typename T>
constexpr struct iovec
MakeIovecT(const T &t) noexcept
MakeIovecT(T &t) noexcept
{
return MakeIovec(std::span{&t, 1});
}
Expand All @@ -33,7 +33,7 @@ inline auto
MakeIovecStatic() noexcept
{
static constexpr T value = _value;
return MakeIovecT<T>(value);
return MakeIovecT<const T>(value);
}

constexpr std::span<std::byte>
Expand Down

0 comments on commit 4efeaea

Please sign in to comment.