Skip to content

Commit 2eb73c0

Browse files
madscientistPaul Smith
andauthored
art_node_printf: Use unsigned counter values (#753)
The C printf() %x conversion specifier requires an unsigned value; change the loop iterator type to unsigned. Co-authored-by: Paul Smith <paul@mad-scientiset.net>
1 parent 24835ad commit 2eb73c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/art/art.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ void art_node_printf(const art_t *art, art_ref_t ref, uint8_t depth) {
15911591
} break;
15921592
case CROARING_ART_NODE48_TYPE: {
15931593
art_node48_t *node48 = (art_node48_t *)inner_node;
1594-
for (int i = 0; i < 256; ++i) {
1594+
for (uint16_t i = 0; i < 256; ++i) {
15951595
if (node48->keys[i] != CROARING_ART_NODE48_EMPTY_VAL) {
15961596
printf("%*s", depth, "");
15971597
printf("key: %02x ", i);
@@ -1603,7 +1603,7 @@ void art_node_printf(const art_t *art, art_ref_t ref, uint8_t depth) {
16031603
} break;
16041604
case CROARING_ART_NODE256_TYPE: {
16051605
art_node256_t *node256 = (art_node256_t *)inner_node;
1606-
for (int i = 0; i < 256; ++i) {
1606+
for (uint16_t i = 0; i < 256; ++i) {
16071607
if (node256->children[i] != CROARING_ART_NULL_REF) {
16081608
printf("%*s", depth, "");
16091609
printf("key: %02x ", i);

0 commit comments

Comments
 (0)