mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
aco: Fix -Wstringop-overflow warnings in aco_span.
GCC does not understand how aco_span works. This patch fixes it by casting the aco_span's this pointer to uintptr_t rather than to a char pointer, effectively telling GCC not to try to figure it out. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3483>
This commit is contained in:
parent
75e5720e1a
commit
6fb3df2786
1 changed files with 2 additions and 2 deletions
|
|
@ -65,14 +65,14 @@ public:
|
|||
* \return data
|
||||
*/
|
||||
constexpr iterator begin() noexcept {
|
||||
return (pointer)((char*)this + offset);
|
||||
return (pointer)((uintptr_t)this + offset);
|
||||
}
|
||||
|
||||
/*! \brief Returns a const_iterator to the begin of the span
|
||||
* \return data
|
||||
*/
|
||||
constexpr const_iterator begin() const noexcept {
|
||||
return (const_pointer)((const char *)this + offset);
|
||||
return (const_pointer)((uintptr_t)this + offset);
|
||||
}
|
||||
|
||||
/*! \brief Returns an iterator to the end of the span
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue