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 <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
parent
16e4ae01bb
commit
df8489816b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user