Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
QSR 1.1, QSR 1.2, QSR 2.0, QSR 2.1
-
None
-
86470dd3a (2.2), 0822e514e (dev)
Description
In the StateManager constructor, the code block that initializes the m_connections array incorrectly assigns the m_stateID field twice while the m_eventID field remains uninitialized.
// Null the connections structure const quint32 numberOfConnections = static_cast<quint32>(sizeof(m_connections) / sizeof(Connection)); for (quint32 k = 0U; k < numberOfConnections; ++k) { m_connections[k].m_stateID = 0U; m_connections[k].m_stateID = 0U; }
The issue should not cause side effects as the m_eventID is properly set during the connect function, and m_connectionsCount is initialized to 0, ensuring no uninitialized connections are accessed. Nonetheless, correcting this code can prevent potential future errors and improve the maintainability and clarity of the codebase.
Attachments
For Gerrit Dashboard: QSR-2736 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
623608,2 | Fix duplicate assignment to m_stateID in StateManager | 2.2 | tqtc-boot2qt/qtsaferenderer-runtime | Status: MERGED | +2 | +1 |
623727,2 | Fix duplicate assignment to m_stateID in StateManager | dev | tqtc-boot2qt/qtsaferenderer-runtime | Status: MERGED | +2 | 0 |