diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-10-14 14:17:15 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-10-14 14:17:15 (GMT) |
commit | 4a993e0d5aa155079f4e02a6d392a1f9f705bf16 (patch) | |
tree | cc071b5722a7a5c7baba91371a6f62d9a79e0cea | |
parent | 4b8d5184405d7725462c5baf0160c513a3b6a971 (diff) |
Attempt to fix warnings in MSVC.
-rw-r--r-- | src/compression/coder.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compression/coder.c b/src/compression/coder.c index b7bc633..7dfe34a 100644 --- a/src/compression/coder.c +++ b/src/compression/coder.c @@ -330,7 +330,8 @@ 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) { - (void) coder_inst; + /* This is just to avoid warnings for unused parameters. For some reason MSVC does not like "(void) coder_inst" here. */ + if(coder_inst); int i,j; unsigned int extract_mask=0x80; unsigned char *ptr=packed; @@ -383,7 +384,8 @@ static int unpack_array_stop_bits(struct coder *coder_inst,unsigned char *packed static int unpack_array_triplet(struct coder *coder_inst,unsigned char *packed,int *output, int length, int coding_parameter) { - (void) coder_inst; + /* This is just to avoid warnings for unused parameters. For some reason MSVC does not like "(void) coder_inst" here. */ + if(coder_inst); int i,j; unsigned int extract_mask=0x80; unsigned char *ptr=packed; @@ -455,7 +457,8 @@ static int unpack_array_triplet(struct coder *coder_inst,unsigned char *packed,i static int unpack_array_bwlzh(struct coder *coder_inst,unsigned char *packed,int *output, int length, int natoms) { - (void) coder_inst; + /* This is just to avoid warnings for unused parameters. For some reason MSVC does not like "(void) coder_inst" here. */ + if(coder_inst); int i,j,k,n=length; unsigned int *pval=warnmalloc(n*sizeof *pval); int nframes=n/natoms/3; |