AP_Logger: fix 'last_file' may be used uninitialized with debug build

This commit is contained in:
Jaaaky 2020-01-04 13:29:22 +02:00 committed by Andrew Tridgell
parent 3d8bd9315c
commit fd98e6c6e9

View File

@ -264,7 +264,7 @@ void AP_Logger_Block::validate_log_structure()
uint16_t file = GetFileNumber();
uint16_t first_file = file;
uint16_t next_file = file;
uint16_t last_file;
uint16_t last_file = 0;
while (file != 0xFFFF && page <= df_NumPages && (file == next_file || (wrapped && file < next_file))) {
uint32_t end_page = find_last_page_of_log(file);