From 0c6dfd3054ee211cb5ed81626f2a6d1ee41fb232 Mon Sep 17 00:00:00 2001 From: Aous Naman Date: Fri, 20 Sep 2024 15:31:25 +1000 Subject: [PATCH] Removes compilation warnings. --- src/apps/common/ojph_img_io.h | 4 ++-- src/core/codestream/ojph_params.cpp | 2 +- src/core/codestream/ojph_params_local.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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;