Merge pull request #3224 from datauwu/formats-remove-unused-state

formats: remove unused states from 7 formats
This commit is contained in:
Dustin L. Howett authored and GitHub committed 2026-07-02 17:27:28 -05:00
commit 1162aaeccb
6 files changed
-24

No files matched your search

@@ -141,7 +141,6 @@ struct lzx_dec {
*/
int max_bits;
int tbl_bits;
int tree_used;
/* Direct access table. */
uint16_t *tbl;
} at, lt, mt, pt;
@@ -267,8 +266,6 @@ struct cffile {
};
struct cfheader {
/* Total bytes of all file size in a Cabinet. */
uint32_t total_bytes;
uint32_t files_offset;
uint16_t folder_count;
uint16_t file_count;
@@ -276,7 +273,6 @@ struct cfheader {
#define PREV_CABINET 0x0001
#define NEXT_CABINET 0x0002
#define RESERVE_PRESENT 0x0004
uint16_t setid;
uint16_t cabinet;
/* Version number. */
unsigned char major;
@@ -295,8 +291,6 @@ struct cab {
int64_t entry_offset;
int64_t entry_bytes_remaining;
int64_t entry_unconsumed;
int64_t entry_compressed_bytes_read;
int64_t entry_uncompressed_bytes_read;
struct cffolder *entry_cffolder;
struct cffile *entry_cffile;
struct cfdata *entry_cfdata;
@@ -690,7 +684,6 @@ cab_read_header(struct archive_read *a)
"Couldn't find out CAB header");
return (ARCHIVE_FATAL);
}
hd->total_bytes = archive_le32dec(p + CFHEADER_cbCabinet);
hd->files_offset = archive_le32dec(p + CFHEADER_coffFiles);
hd->minor = p[CFHEADER_versionMinor];
hd->major = p[CFHEADER_versionMajor];
@@ -701,7 +694,6 @@ cab_read_header(struct archive_read *a)
if (hd->file_count == 0)
goto invalid;
hd->flags = archive_le16dec(p + CFHEADER_flags);
hd->setid = archive_le16dec(p + CFHEADER_setID);
hd->cabinet = archive_le16dec(p + CFHEADER_iCabinet);
used = CFHEADER_iCabinet + 2;
if (hd->flags & RESERVE_PRESENT) {
@@ -945,8 +937,6 @@ archive_read_format_cab_read_header(struct archive_read *a,
cab->end_of_entry = 0;
cab->end_of_entry_cleanup = 0;
cab->entry_compressed_bytes_read = 0;
cab->entry_uncompressed_bytes_read = 0;
cab->entry_unconsumed = 0;
cab->entry_cffile = file;
@@ -3217,7 +3207,6 @@ lzx_make_huffman_table(struct huffman *hf)
tbl = hf->tbl;
bitlen = hf->bitlen;
len_avail = hf->len_size;
hf->tree_used = 0;
/* Initialize table to invalid values */
for (i = 0; i < tbl_size; i++) {
tbl[i] = (uint16_t)hf->len_size;
@@ -227,8 +227,6 @@ struct rar_program_code
{
uint8_t *staticdata;
uint32_t staticdatalen;
uint8_t *globalbackup;
uint32_t globalbackuplen;
uint64_t fingerprint;
uint32_t usagecount;
uint32_t oldfilterlength;
@@ -3606,7 +3604,6 @@ delete_program_code(struct rar_program_code *prog)
{
struct rar_program_code *next = prog->next;
free(prog->staticdata);
free(prog->globalbackup);
free(prog);
prog = next;
}
@@ -167,11 +167,9 @@ enum FILTER_TYPE {
struct filter_info {
int type;
int channels;
int pos_r;
int64_t block_start;
ssize_t block_length;
uint16_t width;
};
struct data_ready {
@@ -152,8 +152,6 @@ struct zip {
struct archive_string format_name;
int64_t central_directory_offset;
int64_t central_directory_offset_adjusted;
size_t central_directory_entries_total;
size_t central_directory_entries_on_this_disk;
int has_encrypted_entries;
/* List of entries (seekable Zip only) */
@@ -4203,7 +4201,6 @@ slurp_central_directory(struct archive_read *a, struct archive_entry* entry,
__archive_rb_tree_init(&zip->tree, &rb_ops);
__archive_rb_tree_init(&zip->tree_rsrc, &rb_rsrc_ops);
zip->central_directory_entries_total = 0;
while (1) {
struct zip_entry *zip_entry;
size_t filename_length, extra_length, comment_length;
@@ -4232,7 +4229,6 @@ slurp_central_directory(struct archive_read *a, struct archive_entry* entry,
zip_entry->next = zip->zip_entries;
zip_entry->flags |= LA_FROM_CENTRAL_DIRECTORY;
zip->zip_entries = zip_entry;
zip->central_directory_entries_total++;
/* version = p[4]; */
zip_entry->system = p[5];
@@ -54,7 +54,6 @@ struct warc_s {
time_t now;
mode_t typ;
unsigned int rng;
/* populated size */
uint64_t populz;
};
@@ -140,8 +139,6 @@ archive_write_set_format_warc(struct archive *_a)
w->now = time(NULL);
/* reset file type info */
w->typ = 0;
/* also initialise our rng */
w->rng = (unsigned int)w->now;
a->format_data = w;
a->format_name = "WARC/1.0";
@@ -154,7 +154,6 @@ struct zip {
enum compression entry_compression;
enum encryption entry_encryption;
int entry_flags;
int experiments;
struct trad_enc_ctx tctx;
char tctx_valid;
unsigned char trad_chkdat;