Skip to content

Commit

Permalink
Initialize dos_time and dos_date in _zip_entry_open
Browse files Browse the repository at this point in the history
Prevents an uninitialized warning when MINIZ_NO_TIME is defined. Follows zip_entry_close.
  • Loading branch information
guilhermelawless committed May 13, 2023
1 parent 8237fe9 commit 7761888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ static int _zip_entry_open(struct zip_t *zip, const char *entryname,
mz_uint num_alignment_padding_bytes, level;
mz_zip_archive_file_stat stats;
int err = 0;
mz_uint16 dos_time, dos_date;
mz_uint16 dos_time = 0, dos_date = 0;
mz_uint32 extra_size = 0;
mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE];
mz_uint64 local_dir_header_ofs = 0;
Expand Down

0 comments on commit 7761888

Please sign in to comment.