1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 23:43:43 -04:00

adsb: fix Coverity UNINIT_CTOR warning in AircraftModel

Initialize the AircraftModel settings pointer to nullptr.

Coverity (CID 649096) flagged m_settings as potentially
uninitialized because the compiler-generated constructor does not
initialize it. Initialize it to nullptr, which is the appropriate
default until setSettings() provides a valid pointer.

This is likely not an issue, as m_settings is typically assigned
shortly after construction. However, correctness depends on that
assumption holding everywhere. Initializing it in the declaration
costs nothing, removes the dependency on initialization order, and
eliminates this class of bugs.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
Robin Getz
2026-07-12 19:16:08 -04:00
parent b3afa02023
commit 810b0524fb
+1 -1
View File
@@ -720,7 +720,7 @@ public:
}
}
const ADSBDemodSettings *m_settings;
const ADSBDemodSettings *m_settings = nullptr;
private:
QList<Aircraft *> m_aircrafts;