Changeset 4a23cb6 in mainline


Ignore:
Timestamp:
2008-06-17T21:32:04Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2a3124c
Parents:
9f491d7
Message:

Fix an off-by-one bug in avltree1 test and also declare an unused static
function as used. These two bugs were breaking building by gcc 4.3.1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/avltree/avltree1.c

    r9f491d7 r4a23cb6  
    4949static int test_tree_balance(avltree_node_t *node);
    5050static avltree_node_t *test_tree_parents(avltree_node_t *node);
    51 static void print_tree_structure_flat (avltree_node_t *node, int level);
     51static void print_tree_structure_flat (avltree_node_t *node, int level)
     52    __attribute__ ((used));
    5253static avltree_node_t *alloc_avltree_node(void);
    5354
     
    6263                tmp = test_tree_parents(node->lft);
    6364                if (tmp != node) {
    64                         printf("Bad parent pointer key: %" PRIu64 ", address: %p\n",
    65                             tmp->key, node->lft);
     65                        printf("Bad parent pointer key: %" PRIu64
     66                            ", address: %p\n", tmp->key, node->lft);
    6667                }
    6768        }
     
    6970                tmp = test_tree_parents(node->rgt);
    7071                if (tmp != node) {
    71                         printf("Bad parent pointer key: %" PRIu64 ", address: %p\n",
     72                        printf("Bad parent pointer key: %" PRIu64
     73                            ", address: %p\n",
    7274                            tmp->key,node->rgt);
    7375                }
     
    9597 * tree.
    9698 */
    97 static void print_tree_structure_flat(avltree_node_t *node, int level)
     99static void
     100print_tree_structure_flat(avltree_node_t *node, int level)
    98101{
    99102        /*
     
    131134                avltree_nodes[i].par = &avltree_nodes[i + 1];
    132135        }
     136        avltree_nodes[i].par = NULL;
    133137       
    134138        /*
     
    170174                avltree_nodes[i].key = i * 3;
    171175       
    172         avltree_nodes[i].par = NULL;
    173176        first_free_node = &avltree_nodes[0];
    174177}
Note: See TracChangeset for help on using the changeset viewer.