[trunk] remove warnings raised by flags -Wall -Wextra -pedantic
authorMickael Savinaud <savmickael@users.noreply.github.com>
Tue, 13 Nov 2012 12:59:35 +0000 (12:59 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Tue, 13 Nov 2012 12:59:35 +0000 (12:59 +0000)
src/lib/openjp2/j2k.c
src/lib/openjp2/mqc.h
src/lib/openjp2/openjpeg.h

index 0ea04266c557baa6d9e1d38694b3610ad2598be2..d95c6f4a3dbfe6aaab88684352c518b41927b5b1 100644 (file)
@@ -4080,8 +4080,6 @@ opj_bool opj_j2k_write_sod(     opj_j2k_t *p_j2k,
                             )
 {
         opj_codestream_info_t *l_cstr_info = 00;
-        opj_cp_t *l_cp = 00;
-
         OPJ_UINT32 l_remaining_data;
 
         /* preconditions */
@@ -4095,8 +4093,6 @@ opj_bool opj_j2k_write_sod(     opj_j2k_t *p_j2k,
         /* make room for the EOF marker */
         l_remaining_data =  p_total_data_size - 4;
 
-        l_cp = &(p_j2k->m_cp);
-
         /* update tile coder */
         p_tile_coder->tp_num = p_j2k->m_specific_param.m_encoder.m_current_poc_tile_part_number ;
         p_tile_coder->cur_tp_num = p_j2k->m_specific_param.m_encoder.m_current_tile_part_number;
@@ -5894,9 +5890,8 @@ void opj_j2k_setup_encoder(     opj_j2k_t *p_j2k,
                 if (parameters->numpocs) {
                         /* initialisation of POC */
                         tcp->POC = 1;
-                        /* TODO */
-                        for (i = 0; i < (unsigned int) parameters->numpocs; i++) {
-                                if((tileno == parameters->POC[i].tile - 1) || (parameters->POC[i].tile == -1)) {
+                        for (i = 0; i < parameters->numpocs; i++) {
+                                if (tileno + 1 == parameters->POC[i].tile )  {
                                         opj_poc_t *tcp_poc = &tcp->pocs[numpocs_tile];
 
                                         tcp_poc->resno0         = parameters->POC[numpocs_tile].resno0;
@@ -9260,7 +9255,6 @@ opj_bool opj_j2k_post_write_tile (      opj_j2k_t * p_j2k,
                                                                 opj_event_mgr_t * p_manager )
 {
         opj_tcd_t * l_tcd = 00;
-        opj_cp_t * l_cp = 00;
         OPJ_UINT32 l_nb_bytes_written;
         OPJ_BYTE * l_current_data = 00;
         OPJ_UINT32 l_tile_size = 0;
@@ -9270,7 +9264,6 @@ opj_bool opj_j2k_post_write_tile (      opj_j2k_t * p_j2k,
         assert(p_j2k->m_specific_param.m_encoder.m_encoded_tile_data);
 
         l_tcd = p_j2k->m_tcd;
-        l_cp = &(p_j2k->m_cp);
         
         l_tile_size = p_j2k->m_specific_param.m_encoder.m_encoded_tile_size;
         l_available_data = l_tile_size;
index bc4e0055c8578c5c8d4d5465f189948ac139544d..0c9dc8c597ea85ff98364b667920e43d669a67b4 100644 (file)
@@ -50,7 +50,7 @@ typedef struct opj_mqc_state {
        /** the probability of the Least Probable Symbol (0.75->0x8000, 1.5->0xffff) */
        OPJ_UINT32 qeval;
        /** the Most Probable Symbol (0 or 1) */
-       OPJ_INT32 mps;
+       OPJ_UINT32 mps;
        /** next state if the next encoded symbol is the MPS */
        struct opj_mqc_state *nmps;
        /** next state if the next encoded symbol is the LPS */
index 6bca2e038692dbb93f780c68bfd08e9623acecca..9efd4878e5a304cb90360c0973bc9babd3659bd9 100644 (file)
@@ -292,7 +292,7 @@ typedef struct opj_cparameters {
        /** progression order changes */
        opj_poc_t POC[32];
        /** number of progression order changes (POC), default to 0 */
-       int numpocs;
+       OPJ_UINT32 numpocs;
        /** number of layers */
        int tcp_numlayers;
        /** rates of layers */