diff options
author | Andreas Buhr <[email protected]> | 2020-10-14 19:40:59 +0200 |
---|---|---|
committer | Andreas Buhr <[email protected]> | 2020-10-16 18:49:02 +0200 |
commit | df8489816b455f43c0fa31924306523fdf3e1898 (patch) | |
tree | a1a82077eb92a433b48a61c77ada1c81a6bca436 | |
parent | 16e4ae01bb0cda830224414892f7809c876ae112 (diff) |
Fix compilation with optimization with g++-10.2
When compiling in RelWithDebInfo configuration with g++-10.2,
it complains:
qtbase/src/gui/painting/qdatabuffer_p.h:71:36: error: argument 1 range
[18446744065119617024, 18446744073709551612] exceeds maximum object size
9223372036854775807 [-Werror=alloc-size-larger-than=]
This patch disables this warning in this place.
Pick-to: 5.15
Change-Id: Id3154ce80a1921671031828aaa7144214adad5dd
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
-rw-r--r-- | src/gui/painting/qdatabuffer_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h index 676750b716d..c3b8c0fd852 100644 --- a/src/gui/painting/qdatabuffer_p.h +++ b/src/gui/painting/qdatabuffer_p.h @@ -66,7 +66,10 @@ public: { capacity = res; if (res) { + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Walloc-size-larger-than=") buffer = (Type*) malloc(capacity * sizeof(Type)); + QT_WARNING_POP Q_CHECK_PTR(buffer); } else { buffer = nullptr; |