From 04c6bb4a72887636b0d5d4c7f6ce4b32100953ed Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Mon, 24 Nov 2014 21:31:09 +0000 Subject: [PATCH] [trunk] removed warnings when building jp2.c (Update issue 442) --- src/lib/openjp2/jp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/openjp2/jp2.c b/src/lib/openjp2/jp2.c index 4a91f89a..3ee07af3 100644 --- a/src/lib/openjp2/jp2.c +++ b/src/lib/openjp2/jp2.c @@ -706,7 +706,7 @@ static OPJ_BYTE * opj_jp2_write_cdef(opj_jp2_t *jp2, OPJ_UINT32 * p_nb_bytes_wri assert(jp2->color.jp2_cdef->info != 00); assert(jp2->color.jp2_cdef->n > 0U); - l_cdef_size += 6 * jp2->color.jp2_cdef->n; + l_cdef_size += 6U * jp2->color.jp2_cdef->n; l_cdef_data = (OPJ_BYTE *) opj_malloc(l_cdef_size); if (l_cdef_data == 00) { @@ -1223,7 +1223,7 @@ void opj_jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color) memcpy(&image->comps[acn], &saved, sizeof(opj_image_comp_t)); /* Swap channels in following channel definitions, don't bother with j <= i that are already processed */ - for (j = i + 1; j < n ; ++j) + for (j = (OPJ_UINT16)(i + 1U); j < n ; ++j) { if (info[j].cn == cn) { info[j].cn = acn;