[trunk] Remove some more warnings about conversion
This commit is contained in:
parent
b1b17ee264
commit
24eca792ff
|
@ -230,7 +230,7 @@ OPJ_BOOL opj_mct_encode_custom(
|
|||
lCurrentMatrix = lCurrentData + pNbComp;
|
||||
|
||||
for (i =0;i<lNbMatCoeff;++i) {
|
||||
lCurrentMatrix[i] = (OPJ_INT32) (*(lMct++) * lMultiplicator);
|
||||
lCurrentMatrix[i] = (OPJ_INT32) (*(lMct++) * (OPJ_FLOAT32)lMultiplicator);
|
||||
}
|
||||
|
||||
for (i = 0; i < n; ++i) {
|
||||
|
|
|
@ -54,7 +54,9 @@ void opj_raw_destroy(opj_raw_t *raw) {
|
|||
}
|
||||
|
||||
OPJ_UINT32 opj_raw_numbytes(opj_raw_t *raw) {
|
||||
return raw->bp - raw->start;
|
||||
const ptrdiff_t diff = raw->bp - raw->start;
|
||||
assert( diff <= 0xffffffff && diff >= 0 ); /* UINT32_MAX */
|
||||
return (OPJ_UINT32)diff;
|
||||
}
|
||||
|
||||
void opj_raw_init_dec(opj_raw_t *raw, OPJ_BYTE *bp, OPJ_UINT32 len) {
|
||||
|
|
|
@ -87,7 +87,7 @@ opj_tgt_tree_t *opj_tgt_create(OPJ_UINT32 numleafsh, OPJ_UINT32 numleafsv) {
|
|||
return 00;
|
||||
}
|
||||
memset(tree->nodes,0,tree->numnodes * sizeof(opj_tgt_node_t));
|
||||
tree->nodes_size = tree->numnodes * sizeof(opj_tgt_node_t);
|
||||
tree->nodes_size = tree->numnodes * (OPJ_UINT32)sizeof(opj_tgt_node_t);
|
||||
|
||||
node = tree->nodes;
|
||||
l_parent_node = &tree->nodes[tree->numleafsh * tree->numleafsv];
|
||||
|
@ -166,7 +166,7 @@ opj_tgt_tree_t *opj_tgt_init(opj_tgt_tree_t * p_tree,OPJ_UINT32 p_num_leafs_h, O
|
|||
opj_tgt_destroy(p_tree);
|
||||
return 00;
|
||||
}
|
||||
l_node_size = p_tree->numnodes * sizeof(opj_tgt_node_t);
|
||||
l_node_size = p_tree->numnodes * (OPJ_UINT32)sizeof(opj_tgt_node_t);
|
||||
|
||||
if (l_node_size > p_tree->nodes_size) {
|
||||
opj_tgt_node_t* new_nodes = (opj_tgt_node_t*) opj_realloc(p_tree->nodes, l_node_size);
|
||||
|
|
Loading…
Reference in New Issue