From e3c2305ff49428e01c16e9e5b7bd311b7fd23200 Mon Sep 17 00:00:00 2001 From: Mickael Savinaud Date: Tue, 13 Nov 2012 17:35:15 +0000 Subject: [PATCH] [trunk] remove warnings raised by flags -Wall -Wextra -pedantic --- src/lib/openjp2/event.c | 1 + src/lib/openjp2/pi.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/openjp2/event.c b/src/lib/openjp2/event.c index bf437792..04d37cf1 100644 --- a/src/lib/openjp2/event.c +++ b/src/lib/openjp2/event.c @@ -114,6 +114,7 @@ opj_bool opj_event_msg(opj_event_mgr_t* p_event_mgr, int event_type, const char va_start(arg, fmt); /* check the length of the format string */ str_length = (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt); + (void)str_length; /* parse the format string and put the result in 'message' */ vsprintf(message, fmt, arg); /* UniPG */ /* deinitialize the optional parameter list */ diff --git a/src/lib/openjp2/pi.c b/src/lib/openjp2/pi.c index e9767916..62e4725d 100644 --- a/src/lib/openjp2/pi.c +++ b/src/lib/openjp2/pi.c @@ -322,8 +322,8 @@ opj_bool opj_pi_next_rpcl(opj_pi_iterator_t * pi) { res = &comp->resolutions[resno]; dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); - pi->dx = !pi->dx ? dx : opj_int_min(pi->dx, dx); - pi->dy = !pi->dy ? dy : opj_int_min(pi->dy, dy); + pi->dx = !pi->dx ? dx : opj_uint_min(pi->dx, dx); + pi->dy = !pi->dy ? dy : opj_uint_min(pi->dy, dy); } } } @@ -406,8 +406,8 @@ opj_bool opj_pi_next_pcrl(opj_pi_iterator_t * pi) { res = &comp->resolutions[resno]; dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); - pi->dx = !pi->dx ? dx : opj_int_min(pi->dx, dx); - pi->dy = !pi->dy ? dy : opj_int_min(pi->dy, dy); + pi->dx = !pi->dx ? dx : opj_uint_min(pi->dx, dx); + pi->dy = !pi->dy ? dy : opj_uint_min(pi->dy, dy); } } } @@ -489,8 +489,8 @@ opj_bool opj_pi_next_cprl(opj_pi_iterator_t * pi) { res = &comp->resolutions[resno]; dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); - pi->dx = !pi->dx ? dx : opj_int_min(pi->dx, dx); - pi->dy = !pi->dy ? dy : opj_int_min(pi->dy, dy); + pi->dx = !pi->dx ? dx : opj_uint_min(pi->dx, dx); + pi->dy = !pi->dy ? dy : opj_uint_min(pi->dy, dy); } if (!pi->tp_on){ pi->poc.ty0 = pi->ty0;