diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-10-14 14:25:10 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-10-14 14:25:10 (GMT) |
commit | b79ab3c01c8e7aa6e4dddb3b34fe1674766d3d06 (patch) | |
tree | e436aeea2cbd93accddc993d62508592d462b774 | |
parent | 4a993e0d5aa155079f4e02a6d392a1f9f705bf16 (diff) |
Fix compiler warnings.
-rw-r--r-- | src/compression/coder.c | 6 | ||||
-rw-r--r-- | src/lib/tng_io.c | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/compression/coder.c b/src/compression/coder.c index 7dfe34a..0e34d93 100644 --- a/src/compression/coder.c +++ b/src/compression/coder.c @@ -331,7 +331,7 @@ 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) { /* This is just to avoid warnings for unused parameters. For some reason MSVC does not like "(void) coder_inst" here. */ - if(coder_inst); + if(coder_inst) {} int i,j; unsigned int extract_mask=0x80; unsigned char *ptr=packed; @@ -385,7 +385,7 @@ 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) { /* This is just to avoid warnings for unused parameters. For some reason MSVC does not like "(void) coder_inst" here. */ - if(coder_inst); + if(coder_inst) {} int i,j; unsigned int extract_mask=0x80; unsigned char *ptr=packed; @@ -458,7 +458,7 @@ 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) { /* This is just to avoid warnings for unused parameters. For some reason MSVC does not like "(void) coder_inst" here. */ - if(coder_inst); + if(coder_inst) {} int i,j,k,n=length; unsigned int *pval=warnmalloc(n*sizeof *pval); int nframes=n/natoms/3; diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index c041472..db44e30 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -5434,11 +5434,11 @@ static tng_function_status tng_data_read(tng_trajectory_t tng_data, if(codec_id != TNG_UNCOMPRESSED) { - data_size = n_frames_div * size * n_values; switch(codec_id) { #ifdef USE_ZLIB case TNG_GZIP_COMPRESSION: + data_size = n_frames_div * size * n_values; // printf("Before compression: %"PRId64"\n", block->block_contents_size); if(tng_gzip_uncompress(tng_data, block, block->block_contents + *offset, @@ -5667,7 +5667,9 @@ static tng_function_status tng_data_block_write(tng_trajectory_t tng_data, block->block_contents_size += sizeof(char); } +#ifdef USE_ZLIB data_start_pos = block->block_contents_size; +#endif if(data->datatype == TNG_CHAR_DATA) { @@ -6502,9 +6504,9 @@ static tng_function_status tng_frame_set_pointers_update contents_start_pos); } } - + fseek(tng_data->output_file, output_file_pos, SEEK_SET); - + tng_data->input_file = temp; tng_block_destroy(&block); @@ -13396,7 +13398,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_interval_get { return(stat); } - + /* Do not re-read the frame set. */ if(first_frame != frame_set->first_frame || frame_set->n_particle_data_blocks <= 0) |