Remove a possible uninitialized variable
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 12 Oct 2015 19:29:12 +0000 (21:29 +0200)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 12 Oct 2015 19:29:12 +0000 (21:29 +0200)
Fixes #629

src/lib/openjp3d/jp3d.c

index f445fb36d9a81d58aef649a48adff451af622799..9e060df741ae35e1e04a6e23d55fbce8ca17f2d2 100644 (file)
@@ -1008,6 +1008,7 @@ static void j3d_write_qcx(opj_j3d_t *j3d, int compno) {
        
        cio_write(cio, tccp->qntsty + (tccp->numgbits << 5), 1);        /* Sqcx : Table A28 de 15444-1*/
        
+       numbands = 0; // compiler warning
        if (j3d->cinfo->codec_format == CODEC_J2K)
         numbands = tccp->qntsty == J3D_CCP_QNTSTY_SIQNT ? 1 : tccp->numresolution[0] * 3 - 2; 
        else if (j3d->cinfo->codec_format == CODEC_J3D) {