[trunk] remove some warnings detected by cppcheck
This commit is contained in:
parent
bfe8b81d18
commit
90eeb25770
10
CHANGES
10
CHANGES
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
|||
! : changed
|
||||
+ : added
|
||||
|
||||
December 7, 2011
|
||||
* [mickael] remove some warnings detected by cppcheck
|
||||
|
||||
December 6, 2011
|
||||
* [mathieu] Typos fix (Brad Hards on mailing list)
|
||||
|
||||
|
@ -15,6 +18,13 @@ December 2, 2011
|
|||
+ [mathieu] Adding CPack mechanism
|
||||
* [mathieu] remove hack with bash around kdu_expand
|
||||
|
||||
December 3, 2011
|
||||
* [mathieu] Doxygen fix (Brad Hards on mailing list)
|
||||
|
||||
December 2, 2011
|
||||
+ [mathieu] Adding CPack mechanism
|
||||
* [mathieu] remove hack with bash around kdu_expand
|
||||
|
||||
December 1, 2011
|
||||
* [mickael] fix a bug during the creation of the codestream index
|
||||
* [mickael] fix a warning about a recent commit (1104)
|
||||
|
|
|
@ -8152,8 +8152,10 @@ opj_bool j2k_decode_tiles ( opj_j2k_v2_t *p_j2k,
|
|||
l_max_data_size = 1000;
|
||||
|
||||
/*Allocate and initialize some elements of codestrem index*/
|
||||
if (!j2k_allocate_tile_element_cstr_index(p_j2k))
|
||||
if (!j2k_allocate_tile_element_cstr_index(p_j2k)){
|
||||
opj_free(l_current_data);
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
while (OPJ_TRUE) {
|
||||
if (! j2k_read_tile_header( p_j2k,
|
||||
|
@ -8176,6 +8178,7 @@ opj_bool j2k_decode_tiles ( opj_j2k_v2_t *p_j2k,
|
|||
if (l_data_size > l_max_data_size) {
|
||||
l_current_data = (OPJ_BYTE*)opj_realloc(l_current_data,l_data_size);
|
||||
if (! l_current_data) {
|
||||
opj_free(l_current_data);
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
|
@ -8238,8 +8241,10 @@ opj_bool j2k_decode_one_tile ( opj_j2k_v2_t *p_j2k,
|
|||
/*Allocate and initialize some elements of codestrem index if not already done*/
|
||||
if( !p_j2k->cstr_index->tile_index)
|
||||
{
|
||||
if (!j2k_allocate_tile_element_cstr_index(p_j2k))
|
||||
if (!j2k_allocate_tile_element_cstr_index(p_j2k)){
|
||||
opj_free(l_current_data);
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
}
|
||||
/* Move into the codestream to the first SOT used to decode the desired tile */
|
||||
l_tile_no_to_dec = p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec;
|
||||
|
@ -8287,6 +8292,7 @@ opj_bool j2k_decode_one_tile ( opj_j2k_v2_t *p_j2k,
|
|||
if (l_data_size > l_max_data_size) {
|
||||
l_current_data = (OPJ_BYTE*)opj_realloc(l_current_data,l_data_size);
|
||||
if (! l_current_data) {
|
||||
opj_free(l_current_data);
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -2047,6 +2047,10 @@ opj_bool jp2_read_header_procedure(
|
|||
if (l_current_handler != 00) {
|
||||
if (l_current_data_size > l_last_data_size) {
|
||||
l_current_data = (unsigned char*)opj_realloc(l_current_data,l_current_data_size);
|
||||
if (!l_current_data){
|
||||
opj_free(l_current_data);
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
l_last_data_size = l_current_data_size;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue