]> granicus.if.org Git - openjpeg/commitdiff
Fix warnings with recent GCC versions
authorEven Rouault <even.rouault@spatialys.com>
Sat, 17 Jun 2017 12:09:31 +0000 (14:09 +0200)
committerEven Rouault <even.rouault@spatialys.com>
Sat, 17 Jun 2017 12:09:31 +0000 (14:09 +0200)
src/lib/openjp2/dwt.c
src/lib/openjp2/t1.c

index a2841282b11351d6ff8698909997fe38bb6c4914..03ba5034edd718b7b0d6622929b210151d8bb457 100644 (file)
@@ -1182,8 +1182,10 @@ OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* OPJ_RESTRICT tilec,
                 switch (j) {
                 case 3:
                     aj[k + (OPJ_INT32)w * 2] = h.wavelet[k].f[2];
+                    /* FALLTHRU */
                 case 2:
                     aj[k + (OPJ_INT32)w  ] = h.wavelet[k].f[1];
+                    /* FALLTHRU */
                 case 1:
                     aj[k               ] = h.wavelet[k].f[0];
                 }
index ce0fb7d13d8fa7facaf421a1d23475bf69aaffd8..33913bb27d2a6dba61dd222fa7aea412a737ef1b 100644 (file)
@@ -345,7 +345,7 @@ static INLINE void opj_t1_enc_sigpass_step(opj_t1_t *t1,
                                 flagsp[-1], flagsp[1],
                                 ci);
             OPJ_UINT32 ctxt2 = opj_t1_getctxno_sc(lu);
-            v = *datap < 0 ? 1 : 0;
+            v = *datap < 0 ? 1U : 0U;
             *nmsedec += opj_t1_getnmsedec_sig((OPJ_UINT32)opj_int_abs(*datap),
                                               (OPJ_UINT32)bpno);
 #ifdef DEBUG_ENC_SIG
@@ -1077,7 +1077,7 @@ LABEL_PARTIAL:
 #endif
                 opj_mqc_setcurctx(mqc, ctxt2);
 
-                v = *datap < 0 ? 1 : 0;
+                v = *datap < 0 ? 1U : 0U;
                 spb = opj_t1_getspb(lu);
 #ifdef DEBUG_ENC_CLN
                 printf("   spb=%d\n", spb);
@@ -1256,21 +1256,21 @@ static void opj_t1_enc_clnpass(
                                             l_w, 0, mqc, curctx, \
                                             v, a, c, ct, oneplushalf, vsc); \
                         partial = OPJ_FALSE; \
-                        /* falltrough */ \
+                        /* FALLTHRU */ \
                     case 1: \
                         opj_t1_dec_clnpass_step_macro(OPJ_FALSE, partial,\
                                             flags, flagsp, flags_stride, data, \
                                             l_w, 1, mqc, curctx, \
                                             v, a, c, ct, oneplushalf, OPJ_FALSE); \
                         partial = OPJ_FALSE; \
-                        /* falltrough */ \
+                        /* FALLTHRU */ \
                     case 2: \
                         opj_t1_dec_clnpass_step_macro(OPJ_FALSE, partial,\
                                             flags, flagsp, flags_stride, data, \
                                             l_w, 2, mqc, curctx, \
                                             v, a, c, ct, oneplushalf, OPJ_FALSE); \
                         partial = OPJ_FALSE; \
-                        /* falltrough */ \
+                        /* FALLTHRU */ \
                     case 3: \
                         opj_t1_dec_clnpass_step_macro(OPJ_FALSE, partial,\
                                             flags, flagsp, flags_stride, data, \