1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-10 20:10:05 +00:00

Fix uninitialized warning

This commit is contained in:
Carles Fernandez 2024-08-20 14:58:01 +02:00
parent 9bf3f457c3
commit 4929d87759
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -34,8 +34,8 @@ struct IONGSMSChunkUnpackingCtx
static constexpr uint8_t word_bitsize_ = sizeof(WT) * 8; static constexpr uint8_t word_bitsize_ = sizeof(WT) * 8;
const GnssMetadata::Chunk::WordShift word_shift_direction_; const GnssMetadata::Chunk::WordShift word_shift_direction_;
WT* iterator_; // Not owned by this class, MUST NOT destroy WT* iterator_ = nullptr; // Not owned by this class, MUST NOT destroy
WT current_word_; WT current_word_{};
uint8_t bitshift_ = 0; uint8_t bitshift_ = 0;
IONGSMSChunkUnpackingCtx( IONGSMSChunkUnpackingCtx(
@ -51,8 +51,11 @@ struct IONGSMSChunkUnpackingCtx
{ {
iterator_ = &data_buffer[data_buffer_word_count]; iterator_ = &data_buffer[data_buffer_word_count];
} }
if (iterator_)
{
advance_word(); // Initializes current_word_ advance_word(); // Initializes current_word_
} }
}
void advance_word() void advance_word()
{ {