QThread: initialize interruptionRequested atomic
Coverity complains correctly that the variable is not initialized. std::atomic's default constructor doesn't do it, and we only do it in QThread::start and QThread::finished. So initialize it using NSMDI. Pick-to: 6.7 6.5 Coverity-Id: 466429 Change-Id: I36d4624d46718f50e10bec17ef5e437c60541fa9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d1f6d2258809ed7e2d7aa50de3b6d6f472cf1bd8) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
f727474ee6
commit
2f319c889d
@ -187,7 +187,7 @@ public:
|
||||
bool running;
|
||||
bool finished;
|
||||
bool isInFinish; //when in QThreadPrivate::finish
|
||||
std::atomic<bool> interruptionRequested;
|
||||
std::atomic<bool> interruptionRequested = false;
|
||||
|
||||
bool exited;
|
||||
int returnCode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user