diff --git a/src/apps/common/ojph_img_io.h b/src/apps/common/ojph_img_io.h index 5f6488f..27ad9f7 100644 --- a/src/apps/common/ojph_img_io.h +++ b/src/apps/common/ojph_img_io.h @@ -498,7 +498,7 @@ namespace ojph { const char *fname; mem_fixed_allocator *alloc_p; float *temp_buf; - ui32 temp_buf_byte_size; + size_t temp_buf_byte_size; ui32 bit_depth[3]; // this truncates data to bit_depth in the LSB float scale; bool little_endian; @@ -621,7 +621,7 @@ namespace ojph { ui32 width, height, num_components; ui32 bit_depth, bytes_per_sample; ui8* buffer; - ui32 buffer_size; + size_t buffer_size; ui32 cur_line, samples_per_line, bytes_per_line; conversion_fun converter; const line_buf *lptr[3]; diff --git a/src/core/codestream/ojph_params.cpp b/src/core/codestream/ojph_params.cpp index dd4692c..2bd3987 100644 --- a/src/core/codestream/ojph_params.cpp +++ b/src/core/codestream/ojph_params.cpp @@ -1298,7 +1298,7 @@ namespace ojph { for (ui32 c = 0; c < num_comps; ++c) { - ui16 bd = siz.get_bit_depth(c); + ui32 bd = siz.get_bit_depth(c); bool is = siz.is_signed(c); if (bd != bit_depth || is != is_signed) { diff --git a/src/core/codestream/ojph_params_local.h b/src/core/codestream/ojph_params_local.h index 8415e07..ac8bb77 100644 --- a/src/core/codestream/ojph_params_local.h +++ b/src/core/codestream/ojph_params_local.h @@ -284,7 +284,7 @@ namespace ojph { void set_Rsiz_flag(ui16 flag) { Rsiz |= flag; } void reset_Rsiz_flag(ui16 flag) - { Rsiz &= ~flag; } + { Rsiz = (ui16)(Rsiz & ~flag); } private: ui16 Lsiz;