From 3e9f2a0adbf0aecc652f559acaad865ca5ad1858 Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Thu, 9 Mar 2023 15:17:19 +0100 Subject: [PATCH] Silence an unused-parameter warning On Windows, when using unity build, compilers insist that these are not used, even though they are; and consequently the build fails. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I6441134db563e0553a3c9193afe2569fc2ffce85 Reviewed-by: Joerg Bornemann Reviewed-by: Thiago Macieira --- src/corelib/tools/qvarlengtharray.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index 9778e47f3c6..44c5d8beacc 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -52,7 +52,8 @@ protected: qsizetype s; // size void *ptr; // data - Q_ALWAYS_INLINE constexpr void verify(qsizetype pos = 0, qsizetype n = 1) const + Q_ALWAYS_INLINE constexpr void verify([[maybe_unused]] qsizetype pos = 0, + [[maybe_unused]] qsizetype n = 1) const { Q_ASSERT(pos >= 0); Q_ASSERT(pos <= size());