mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(oldgnu_get_sparse_info) fix conditional-uninitialized warning.
tar-sparse.c:563:55: warning: variable 'rc' may be uninitialized when used here [-Wconditional-uninitialized] for (ext_p = h->oldgnu_header.isextended ? 1 : 0; rc == add_ok && ext_p != 0; ^~ tar-sparse.c:551:5: note: variable 'rc' is declared here enum oldgnu_add_status rc; ^ Found by clang-16. Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
9a964edea9
commit
e87e0524a8
@ -548,7 +548,7 @@ oldgnu_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file)
|
||||
size_t i;
|
||||
union block *h = current_header;
|
||||
int ext_p;
|
||||
enum oldgnu_add_status rc;
|
||||
enum oldgnu_add_status rc = add_fail;
|
||||
|
||||
if (file->stat_info->sparse_map != NULL)
|
||||
g_array_set_size (file->stat_info->sparse_map, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user