1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-19 18:03:39 -04:00

modemm17: initialize Viterbi metric buffers

Initialize prevMetrics and currMetrics so the metric buffers are not left
indeterminate during construction. Both buffers are explicitly populated
before their contents are used, so this is defensive initialization rather
than a functional fix.

Detected by cppcheck.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
Robin Getz
2026-08-10 18:36:15 -04:00
parent e2aecad577
commit d37e1dae5e
+2 -1
View File
@@ -111,7 +111,8 @@ struct Viterbi
state_transition_t nextState_;
state_transition_t prevState_;
metrics_t prevMetrics, currMetrics;
metrics_t prevMetrics{};
metrics_t currMetrics{};
// This is the maximum amount of storage needed for M17. If used for
// other modes, this may need to be increased. This will never overflow