From 0f730ef7b6cc9571147e779183b317547011526b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 16 Feb 2017 11:42:14 +0100 Subject: [PATCH] QReadWriteLock: make field 'recursive' const It is never written after initialization, and accessed concurrently outside mutex protection, so make sure that it never changes by marking it as const. Change-Id: Ib28b2e8b3067d596a95d1699165a6ebfb15fe674 Reviewed-by: David Faure Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/thread/qreadwritelock_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/thread/qreadwritelock_p.h b/src/corelib/thread/qreadwritelock_p.h index bb58dfab56..04dd45a2e1 100644 --- a/src/corelib/thread/qreadwritelock_p.h +++ b/src/corelib/thread/qreadwritelock_p.h @@ -74,7 +74,7 @@ public: int writerCount; int waitingReaders; int waitingWriters; - bool recursive; + const bool recursive; //Called with the mutex locked bool lockForWrite(int timeout);