From 817f4cee834c58597629354000461a89efe6fe62 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 2 Apr 2017 19:35:08 +0200 Subject: [PATCH] Fix all warnings in fujicompressed.cc --- rtengine/fujicompressed.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rtengine/fujicompressed.cc b/rtengine/fujicompressed.cc index 2e0b83485..75ca46c04 100644 --- a/rtengine/fujicompressed.cc +++ b/rtengine/fujicompressed.cc @@ -20,7 +20,7 @@ it under the terms of the one of three licenses as you choose: void CLASS init_fuji_compr (struct fuji_compressed_params* info) { - int cur_val, i; + int cur_val; char *qt; if ((fuji_block_width % 3 && fuji_raw_type == 16) || (fuji_block_width & 1 && fuji_raw_type == 0)) { @@ -171,7 +171,7 @@ void CLASS copy_line_to_xtrans (struct fuji_compressed_block* info, int cur_line while (row_count < 6) { pixel_count = 0; - while (pixel_count < cur_block_width) { + while (static_cast(pixel_count) < cur_block_width) { switch (xtrans_abs[row_count][ (pixel_count % 6)]) { case 0: // red line_buf = lineBufR[row_count >> 1]; @@ -182,11 +182,12 @@ void CLASS copy_line_to_xtrans (struct fuji_compressed_block* info, int cur_line break; case 2: // blue + default: line_buf = lineBufB[row_count >> 1]; break; } - index = (((pixel_count * 2 / 3) & 0x7FFFFFFE) | (pixel_count % 3) & 1) + ((pixel_count % 3) >> 1); + index = (((pixel_count * 2 / 3) & 0x7FFFFFFE) | ((pixel_count % 3) & 1)) + ((pixel_count % 3) >> 1); raw_block_data[pixel_count] = line_buf[index]; ++pixel_count; @@ -228,7 +229,7 @@ void CLASS copy_line_to_bayer (struct fuji_compressed_block *info, int cur_line, while (row_count < 6) { pixel_count = 0; - while (pixel_count < cur_block_width) { + while (static_cast(pixel_count) < cur_block_width) { switch (fuji_bayer[row_count & 1][pixel_count & 1]) { case 0: // red line_buf = lineBufR[row_count >> 1]; @@ -897,12 +898,11 @@ void CLASS fuji_compressed_load_raw() { struct fuji_compressed_params common_info; int cur_block; - unsigned line_size, *block_sizes; + unsigned *block_sizes; INT64 raw_offset, *raw_block_offsets; //struct fuji_compressed_block info; init_fuji_compr (&common_info); - line_size = sizeof (ushort) * (common_info.line_width + 2); // read block sizes block_sizes = (unsigned*) malloc (sizeof (unsigned) * fuji_total_blocks);