diff --git a/lrzip.c b/lrzip.c index 68a7251..8767db1 100644 --- a/lrzip.c +++ b/lrzip.c @@ -525,7 +525,7 @@ void decompress_file(rzip_control *control) { char *tmp, *tmpoutfile, *infilecopy = NULL; int fd_in, fd_out = -1, fd_hist = -1; - i64 expected_size, free_space; + i64 expected_size = 0, free_space; struct statvfs fbuf; if (!STDIN) { diff --git a/rzip.c b/rzip.c index 3712043..8723ea9 100644 --- a/rzip.c +++ b/rzip.c @@ -666,8 +666,6 @@ static void init_hash_indexes(struct rzip_state *st) st->hash_index[i] = ((random() << 16) ^ random()); } -extern const i64 one_g; - static inline void *fake_mremap(void *old_address, size_t old_size, size_t new_size, int flags __UNUSED__) { munmap(old_address, old_size); @@ -980,7 +978,6 @@ retry: if (unlikely(len > 0 && control->eof)) failure("Wrote EOF to file yet chunk_size was shrunk, corrupting archive.\n"); } -close_streams: close_streamout_threads(control); if (likely(st->hash_table)) diff --git a/stream.c b/stream.c index 3bf5235..a745ad5 100644 --- a/stream.c +++ b/stream.c @@ -662,7 +662,7 @@ out: /* WORK FUNCTIONS */ -const i64 one_g = 1000 * 1024 * 1024; +i64 one_g = 1000 * 1024 * 1024; /* Look at whether we're writing to a ram location or physical files and write * the data accordingly. */ diff --git a/stream.h b/stream.h index 95454b2..9e4600a 100644 --- a/stream.h +++ b/stream.h @@ -38,6 +38,6 @@ i64 read_stream(rzip_control *control, void *ss, int streamno, uchar *p, i64 len int close_stream_out(rzip_control *control, void *ss); int close_stream_in(void *ss); ssize_t put_fdout(rzip_control *control, void *offset_buf, ssize_t ret); -const i64 one_g; +i64 one_g; #endif