Suppress GCC 13's -Wmaybe-uninitialized in q_uninitialized_relocate_n
Its objective is to copy uninitialized content and that's fine. qcontainertools_impl.h:73:25: error: ‘~~~’ may be used uninitialized [-Werror=maybe-uninitialized] 73 | std::memmove(static_cast<void*>(out), | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ 74 | static_cast<const void*>(first), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 75 | n * sizeof(T)); | ~~~~~~~~~~~~~~ Change-Id: Ide4dbd0777a44ed0870efffd173917092b671dd0 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit a26d25be7b782d35a0b03b38dd0785188e1228e1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
1e7ec8620b
commit
36236a66fe
@ -56,6 +56,9 @@ static constexpr bool q_points_into_range(const T &p, const C &c) noexcept
|
||||
std::data(c) + std::distance(std::begin(c), std::end(c)));
|
||||
}
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized")
|
||||
|
||||
template <typename T, typename N>
|
||||
void q_uninitialized_move_if_noexcept_n(T* first, N n, T* out)
|
||||
{
|
||||
@ -81,6 +84,8 @@ void q_uninitialized_relocate_n(T* first, N n, T* out)
|
||||
}
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
template<typename iterator, typename N>
|
||||
void q_relocate_overlap_n_left_move(iterator first, N n, iterator d_first)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user