summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2024-03-21 14:18:54 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-03-22 09:20:10 +0000
commit4082598bb987c6ea7173d84b63561563966ca8f2 (patch)
treea34c3faa39ac2ba7c5d09388942a4aa746d32b01
parent51cbf0d189f27baf472428563d7f17d33093542f (diff)
gui: fix build against gcc-14 (-Werror=calloc-transposed-args)
src/gui/painting/qpaintengine_raster.cpp:3811:42: error: ‘void* calloc(size_t, size_t)’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 3811 | m_clipLines = (ClipLine *)calloc(sizeof(ClipLine), clipSpanHeight); | ^~~~~~~~~~~~~~~~ src/gui/painting/qpaintengine_raster.cpp:3811:42: note: earlier argument should specify number of elements, later size of each element Pick-to: 6.5 6.2 5.15 Change-Id: I41ec3dd5c439e5cd51dd917741125ce50659500e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 12a432c80feba60ced4c67b496ac0762bacb8777) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d96653f559175f42da36ad5f590a113121368e65)
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 0beeb6d3a1..c0f73ba40c 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3808,7 +3808,7 @@ void QClipData::initialize()
return;
if (!m_clipLines)
- m_clipLines = (ClipLine *)calloc(sizeof(ClipLine), clipSpanHeight);
+ m_clipLines = (ClipLine *)calloc(clipSpanHeight, sizeof(ClipLine));
Q_CHECK_PTR(m_clipLines);
QT_TRY {