diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-07-30 23:02:42 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-08-01 10:53:59 +0200 |
| commit | 84b37e96fc8f20c8ffdb0aa0b3a2cd9b5d48fbf1 (patch) | |
| tree | 4612782ee114e195299a1543c8e4ba43b9c0222e /src/gui/doc/snippets/code | |
| parent | a5a0c18d0abd3b567821902de499c1866615911f (diff) | |
QSemaphore: fix Coverity warning about uninit'ed field
The m_n member is not read in normal operation when m_sem is nullptr,
but since move-assignment to the default-constructed object (a valid
operation even on partially-formed states) reads this value
uninitialized as part of the move-and-swap, we need it initialized,
because otherwise it's UB.
Amends f0ee4ed0a28d274c7a8efeb9e6ac8642e020e2cc.
Coverity-Id: 483737
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ifd200877cef693110832675b6e172bc083372d4f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions
