summaryrefslogtreecommitdiff
path: root/src/compression
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-10-09 12:47:42 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-10-09 12:47:42 (GMT)
commitea37cbf48b84b75a9ec535af679d6104757e4271 (patch)
tree07df943c7ca93ff3200601fba71ef304a29ba275 /src/compression
parent0fad649af860bebdc3b4e422700b721c0f09007d (diff)
Fixing many compiler warnings.
Diffstat (limited to 'src/compression')
-rw-r--r--src/compression/bwlzh.c4
-rw-r--r--src/compression/coder.c3
-rw-r--r--src/compression/huffman.c5
-rw-r--r--src/compression/huffmem.c1
-rw-r--r--src/compression/lz77.c3
-rw-r--r--src/compression/xtc2.c2
-rw-r--r--src/compression/xtc3.c4
7 files changed, 22 insertions, 0 deletions
diff --git a/src/compression/bwlzh.c b/src/compression/bwlzh.c
index 62a5939..e5eb499 100644
--- a/src/compression/bwlzh.c
+++ b/src/compression/bwlzh.c
@@ -81,7 +81,9 @@ static void bwlzh_compress_gen(unsigned int *vals, int nvals,
int huffdatalen;
int nhufflen[N_HUFFMAN_ALGO];
int huffalgo;
+#ifndef PARTIAL_MTF
int ndict;
+#endif
int bwt_index;
unsigned int *bwt=NULL;
#ifdef PARTIAL_MTF3
@@ -494,7 +496,9 @@ static void bwlzh_decompress_gen(unsigned char *input, int nvals,
{
unsigned int *vals16;
int nvals16;
+#ifndef PARTIAL_MTF
int ndict;
+#endif
int bwt_index;
unsigned int *bwt=NULL;
unsigned int *mtf=NULL;
diff --git a/src/compression/coder.c b/src/compression/coder.c
index a9a9117..be46c17 100644
--- a/src/compression/coder.c
+++ b/src/compression/coder.c
@@ -332,6 +332,7 @@ unsigned char *Ptngc_pack_array(struct coder *coder,int *input, int *length, int
static int unpack_array_stop_bits(struct coder *coder,unsigned char *packed,int *output, int length, int coding_parameter)
{
+ (void)coder;
int i,j;
unsigned int extract_mask=0x80;
unsigned char *ptr=packed;
@@ -384,6 +385,7 @@ static int unpack_array_stop_bits(struct coder *coder,unsigned char *packed,int
static int unpack_array_triplet(struct coder *coder,unsigned char *packed,int *output, int length, int coding_parameter)
{
+ (void)coder;
int i,j;
unsigned int extract_mask=0x80;
unsigned char *ptr=packed;
@@ -455,6 +457,7 @@ static int unpack_array_triplet(struct coder *coder,unsigned char *packed,int *o
static int unpack_array_bwlzh(struct coder *coder,unsigned char *packed,int *output, int length, int natoms)
{
+ (void)coder;
int i,j,k,n=length;
unsigned int *pval=warnmalloc(n*sizeof *pval);
int nframes=n/natoms/3;
diff --git a/src/compression/huffman.c b/src/compression/huffman.c
index 1272e46..b5cd3c7 100644
--- a/src/compression/huffman.c
+++ b/src/compression/huffman.c
@@ -56,6 +56,7 @@ struct codelength
static int comp_htree(const void *leafptr1, const void *leafptr2, const void *private)
{
+ (void)private;
const union htree_nodeleaf *leaf1=(union htree_nodeleaf *)leafptr1;
const union htree_nodeleaf *leaf2=(union htree_nodeleaf *)leafptr2;
@@ -185,6 +186,7 @@ static unsigned int readbits(int length, unsigned char **input, int *bitptr)
static int comp_codes(const void *codeptr1, const void *codeptr2, const void *private)
{
+ (void)private;
const struct codelength *code1=(struct codelength *)codeptr1;
const struct codelength *code2=(struct codelength *)codeptr2;
@@ -202,6 +204,7 @@ static int comp_codes(const void *codeptr1, const void *codeptr2, const void *pr
static int comp_codes_value(const void *codeptr1, const void *codeptr2, const void *private)
{
+ (void)private;
const struct codelength *code1=(struct codelength *)codeptr1;
const struct codelength *code2=(struct codelength *)codeptr2;
@@ -470,6 +473,8 @@ void Ptngc_comp_conv_from_huffman(unsigned char *huffman,
unsigned int *huffman_dict_unpacked,
int huffman_dict_unpackedlen)
{
+ (void)huffman_dictlen;
+ (void)huffman_dict_unpackedlen;
struct codelength *codelength=warnmalloc(ndict*sizeof *codelength);
int i,j;
int maxdict;
diff --git a/src/compression/huffmem.c b/src/compression/huffmem.c
index 30ce2a7..d43bc19 100644
--- a/src/compression/huffmem.c
+++ b/src/compression/huffmem.c
@@ -242,6 +242,7 @@ void Ptngc_comp_huff_compress(unsigned int *vals, int nvals,
void Ptngc_comp_huff_decompress(unsigned char *huffman, int huffman_len,
unsigned int *vals)
{
+ (void)huffman_len;
int isvals16=(int)huffman[0];
unsigned int *vals16=NULL;
int algo=(int)huffman[1];
diff --git a/src/compression/lz77.c b/src/compression/lz77.c
index 705e89d..eb80a55 100644
--- a/src/compression/lz77.c
+++ b/src/compression/lz77.c
@@ -313,6 +313,9 @@ void Ptngc_comp_from_lz77(unsigned int *data, int ndata,
unsigned int *offsets, int noffsets,
unsigned int *vals, int nvals)
{
+ (void)ndata;
+ (void)nlens;
+ (void)noffsets;
int i=0;
int joff=0;
int jdat=0;
diff --git a/src/compression/xtc2.c b/src/compression/xtc2.c
index 76f6264..c78a9f0 100644
--- a/src/compression/xtc2.c
+++ b/src/compression/xtc2.c
@@ -363,6 +363,7 @@ static void swap_is_better(int *input, int *minint, int *sum_normal, int *sum_sw
static void swapdecide(struct coder *coder, int *input,int *swapatoms, int *large_index, int *minint, unsigned char **output_ptr)
{
+ (void)large_index;
int didswap=0;
int normal,swapped;
swap_is_better(input,minint,&normal,&swapped);
@@ -1270,6 +1271,7 @@ unsigned char *Ptngc_pack_array_xtc2(struct coder *coder,int *input, int *length
int Ptngc_unpack_array_xtc2(struct coder *coder,unsigned char *packed,int *output, int length)
{
+ (void)coder;
unsigned char *ptr=packed;
int bitptr=0;
int minint[3];
diff --git a/src/compression/xtc3.c b/src/compression/xtc3.c
index c26d7aa..197cc12 100644
--- a/src/compression/xtc3.c
+++ b/src/compression/xtc3.c
@@ -205,6 +205,9 @@ static void insert_value_in_array(unsigned int **ptr, int *nele, int *nele_alloc
unsigned int value,
char *arrayname)
{
+#ifndef SHOWIT
+ (void)arrayname;
+#endif
allocate_enough_memory(ptr,nele,nele_alloc);
#ifdef SHOWIT
fprintf(stderr,"Inserting value %u into array %s @ %d\n",value,arrayname,(*nele)-1);
@@ -216,6 +219,7 @@ static void insert_value_in_array(unsigned int **ptr, int *nele, int *nele_alloc
static void swapdecide(struct xtc3_context *xtc3_context, int *input,int *swapatoms, int *large_index, int *minint)
{
+ (void)large_index;
int didswap=0;
int normal,swapped;
swap_is_better(input,minint,&normal,&swapped);
contact: Jan Huwald // Impressum