diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-10-14 14:32:30 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-10-14 14:32:30 (GMT) |
commit | ff2db43e1c85a09cc3a9ab2d2bcaa6633f8af954 (patch) | |
tree | a26e5cd6b53dc75d5fffd41bb98bd25bbc84991c /src/compression | |
parent | b79ab3c01c8e7aa6e4dddb3b34fe1674766d3d06 (diff) |
More attempts to fix compiler warnings.
Diffstat (limited to 'src/compression')
-rw-r--r-- | src/compression/coder.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/compression/coder.c b/src/compression/coder.c index 0e34d93..8d8b5bd 100644 --- a/src/compression/coder.c +++ b/src/compression/coder.c @@ -328,10 +328,11 @@ unsigned char *Ptngc_pack_array(struct coder *coder_inst,int *input, int *length } } -static int unpack_array_stop_bits(struct coder *coder_inst,unsigned char *packed,int *output, int length, int coding_parameter) +static int unpack_array_stop_bits(struct coder *coder_inst, + unsigned char *packed,int *output, + int length, int coding_parameter) { - /* This is just to avoid warnings for unused parameters. For some reason MSVC does not like "(void) coder_inst" here. */ - if(coder_inst) {} + (void) coder_inst; int i,j; unsigned int extract_mask=0x80; unsigned char *ptr=packed; @@ -382,10 +383,11 @@ static int unpack_array_stop_bits(struct coder *coder_inst,unsigned char *packed return 0; } -static int unpack_array_triplet(struct coder *coder_inst,unsigned char *packed,int *output, int length, int coding_parameter) +static int unpack_array_triplet(struct coder *coder_inst, + unsigned char *packed, int *output, + int length, int coding_parameter) { - /* This is just to avoid warnings for unused parameters. For some reason MSVC does not like "(void) coder_inst" here. */ - if(coder_inst) {} + (void) coder_inst; int i,j; unsigned int extract_mask=0x80; unsigned char *ptr=packed; @@ -455,10 +457,11 @@ static int unpack_array_triplet(struct coder *coder_inst,unsigned char *packed,i return 0; } -static int unpack_array_bwlzh(struct coder *coder_inst,unsigned char *packed,int *output, int length, int natoms) +static int unpack_array_bwlzh(struct coder *coder_inst, + unsigned char *packed, int *output, + int length, int natoms) { - /* This is just to avoid warnings for unused parameters. For some reason MSVC does not like "(void) coder_inst" here. */ - if(coder_inst) {} + (void) coder_inst; int i,j,k,n=length; unsigned int *pval=warnmalloc(n*sizeof *pval); int nframes=n/natoms/3; @@ -479,7 +482,10 @@ static int unpack_array_bwlzh(struct coder *coder_inst,unsigned char *packed,int return 0; } -int Ptngc_unpack_array(struct coder *coder_inst,unsigned char *packed,int *output, int length, int coding, int coding_parameter, int natoms) +int Ptngc_unpack_array(struct coder *coder_inst, + unsigned char *packed, int *output, + int length, int coding, int coding_parameter, + int natoms) { if ((coding==TNG_COMPRESS_ALGO_STOPBIT) || (coding==TNG_COMPRESS_ALGO_VEL_STOPBIT_INTER)) |