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));
| ~~~~~~~~~~~~~~
Pick-to: 6.5
Change-Id: Ide4dbd0777a44ed0870efffd173917092b671dd0
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
bb10
parent
609e14724e
commit
a26d25be7b
|
|
@ -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…
Reference in New Issue