summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2023-12-08 15:36:22 +0100
committerGitHub <noreply@github.com>2023-12-08 15:36:22 +0100
commit65282a0c2fe32668baef03c347ee8d289e2cb647 (patch)
treebad127b63eb054f772b25135994ae847d9f2e36d /src
parentb0e83a1b3399f5f847250bdc044a96f22cb156d7 (diff)
parent597389a45f63a7cd872859eacb267ea1bda64e9e (diff)
Merge pull request #1494 from tomoaki0705/suppress_warning_clang
suppress warning during build using clang
Diffstat (limited to 'src')
-rw-r--r--src/lib/openjp2/j2k.c2
-rw-r--r--src/lib/openjp2/tcd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
index 9dbba8f1..be781e80 100644
--- a/src/lib/openjp2/j2k.c
+++ b/src/lib/openjp2/j2k.c
@@ -7815,7 +7815,7 @@ OPJ_BOOL opj_j2k_setup_encoder(opj_j2k_t *p_j2k,
image->comps[0].h * image->comps[0].prec) /
((double)parameters->tcp_rates[parameters->tcp_numlayers - 1] * 8 *
image->comps[0].dx * image->comps[0].dy));
- if (temp_size > INT_MAX) {
+ if (temp_size > (OPJ_FLOAT32)INT_MAX) {
parameters->max_cs_size = INT_MAX;
} else {
parameters->max_cs_size = (int) floor(temp_size);
diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c
index 438247b6..55e9a088 100644
--- a/src/lib/openjp2/tcd.c
+++ b/src/lib/openjp2/tcd.c
@@ -2330,7 +2330,7 @@ static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd)
for (j = 0; j < l_height; ++j) {
for (i = 0; i < l_width; ++i) {
OPJ_FLOAT32 l_value = *((OPJ_FLOAT32 *) l_current_ptr);
- if (l_value > INT_MAX) {
+ if (l_value > (OPJ_FLOAT32)INT_MAX) {
*l_current_ptr = l_max;
} else if (l_value < INT_MIN) {
*l_current_ptr = l_min;