[trunk] Fix remainings warnings on linux/32bits arch
This commit is contained in:
parent
fa436eb368
commit
5dd770746b
|
@ -1004,12 +1004,12 @@ OPJ_BOOL opj_jp2_read_pclr( opj_jp2_t *jp2,
|
|||
|
||||
if (bytes_to_read > sizeof(OPJ_UINT32))
|
||||
bytes_to_read = sizeof(OPJ_UINT32);
|
||||
if ((ptrdiff_t)p_pclr_header_size < p_pclr_header_data - orig_header_data + bytes_to_read)
|
||||
if ((ptrdiff_t)p_pclr_header_size < p_pclr_header_data - orig_header_data + (ptrdiff_t)bytes_to_read)
|
||||
return OPJ_FALSE;
|
||||
|
||||
if (bytes_to_read > sizeof(OPJ_UINT32))
|
||||
bytes_to_read = sizeof(OPJ_UINT32);
|
||||
if ((ptrdiff_t)p_pclr_header_size < p_pclr_header_data - orig_header_data + bytes_to_read)
|
||||
if ((ptrdiff_t)p_pclr_header_size < p_pclr_header_data - orig_header_data + (ptrdiff_t)bytes_to_read)
|
||||
return OPJ_FALSE;
|
||||
|
||||
opj_read_bytes(p_pclr_header_data, &l_value , bytes_to_read); /* Cji */
|
||||
|
|
|
@ -55,7 +55,7 @@ void opj_raw_destroy(opj_raw_t *raw) {
|
|||
|
||||
OPJ_UINT32 opj_raw_numbytes(opj_raw_t *raw) {
|
||||
const ptrdiff_t diff = raw->bp - raw->start;
|
||||
assert( diff <= 0xffffffff && diff >= 0 ); /* UINT32_MAX */
|
||||
assert( diff <= (ptrdiff_t)0xffffffff && diff >= 0 ); /* UINT32_MAX */
|
||||
return (OPJ_UINT32)diff;
|
||||
}
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ OPJ_BOOL opj_t2_decode_packets( opj_t2_t *p_t2,
|
|||
|
||||
/* don't forget to release pi */
|
||||
opj_pi_destroy(l_pi,l_nb_pocs);
|
||||
assert( l_current_data - p_src < UINT32_MAX );
|
||||
assert( l_current_data - p_src < (ptrdiff_t)UINT32_MAX );
|
||||
*p_data_read = (OPJ_UINT32)(l_current_data - p_src);
|
||||
return OPJ_TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue