From ea1da56f8478f7b604d373b22fb89bee0757fa79 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 17 Sep 2024 12:17:20 +0200 Subject: [PATCH] qwaitcondition_p.h: fix -Wunused-const-variable Make the constexpr variable inline instead of static to shut up the warning. Amends fbc491230fe62f739925e8113d05f4108e2738ef. Pick-to: 6.7 Task-number: QTBUG-126219 Change-Id: Ifa8db14dc28f039d0dc65eb779d715cd4a2c7240 Reviewed-by: Thiago Macieira (cherry picked from commit 743403cb6d9957c1bdb6ef7a1bb6f30377f578a5) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/thread/qwaitcondition_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/thread/qwaitcondition_p.h b/src/corelib/thread/qwaitcondition_p.h index 14833d56eff..c99fa8d6923 100644 --- a/src/corelib/thread/qwaitcondition_p.h +++ b/src/corelib/thread/qwaitcondition_p.h @@ -28,7 +28,7 @@ namespace QtPrivate { // Ideal alignment for mutex and condition_variable: it's the hardware // interference size (size of a cache line) if the types are likely to contain // the actual data structures, otherwise just that of a pointer. -static constexpr quintptr IdealMutexAlignment = +inline constexpr quintptr IdealMutexAlignment = sizeof(std::mutex) > sizeof(void *) && sizeof(std::condition_variable) > sizeof(void *) ? 64 : alignof(void*);