]> granicus.if.org Git - openjpeg/commitdiff
[trunk] remove warnings raised by flags -Wall -Wextra -pedantic
authorMickael Savinaud <savmickael@users.noreply.github.com>
Tue, 13 Nov 2012 17:35:15 +0000 (17:35 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Tue, 13 Nov 2012 17:35:15 +0000 (17:35 +0000)
src/lib/openjp2/event.c
src/lib/openjp2/pi.c

index bf4377927544c45214ecfec65aacd8892a6511b5..04d37cf185f6c5090e35fa638d768241992c646c 100644 (file)
@@ -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 */
index e97679168e8fa45892f84ff4cdf2b98742993895..62e4725d76109e7c41c065a4d285feea5e381224 100644 (file)
@@ -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;