mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-13 07:22:52 +01:00
huffman: quiet int64 -> int conversion warning
children_ is bounded by max_nodes_ and protected with IsFull checks Change-Id: Iac1eb03c5030568140352174c1265a938fc28d97
This commit is contained in:
parent
1349edade1
commit
d96e722b0c
@ -35,7 +35,8 @@ static int IsFull(const HuffmanTree* const tree) {
|
|||||||
static void AssignChildren(HuffmanTree* const tree,
|
static void AssignChildren(HuffmanTree* const tree,
|
||||||
HuffmanTreeNode* const node) {
|
HuffmanTreeNode* const node) {
|
||||||
HuffmanTreeNode* const children = tree->root_ + tree->num_nodes_;
|
HuffmanTreeNode* const children = tree->root_ + tree->num_nodes_;
|
||||||
node->children_ = children - node;
|
node->children_ = (int)(children - node);
|
||||||
|
assert(children - node == (int)(children - node));
|
||||||
tree->num_nodes_ += 2;
|
tree->num_nodes_ += 2;
|
||||||
TreeNodeInit(children + 0);
|
TreeNodeInit(children + 0);
|
||||||
TreeNodeInit(children + 1);
|
TreeNodeInit(children + 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user