Silence compiler warnings.

This commit is contained in:
Con Kolivas 2011-05-08 00:05:46 +10:00
parent 542c1637b2
commit 1ea75154d6
4 changed files with 3 additions and 6 deletions

View file

@ -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) {

3
rzip.c
View file

@ -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))

View file

@ -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. */

View file

@ -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