prog.c:1:51: warning: 'struct rb_node' declared inside parameter list
static int _rb_range(struct rb_tree *tree, struct rb_node *node, void *range, void *cookie, int (*comp)(const void *, const void *), int (*call)(void *, void *))
^
prog.c:1:51: warning: its scope is only this definition or declaration, which is probably not what you want
prog.c:1:51: warning: 'struct rb_tree' declared inside parameter list
prog.c: In function '_rb_range':
prog.c:5:14: warning: implicit declaration of function 'rb_nil' [-Wimplicit-function-declaration]
if (node != rb_nil(tree)) {
^
prog.c:5:11: warning: comparison between pointer and integer
if (node != rb_nil(tree)) {
^
prog.c:6:26: error: dereferencing pointer to incomplete type 'struct rb_node'
test = comp(range, node->data);
^
prog.c: At top level:
prog.c:30:21: warning: 'struct rb_tree' declared inside parameter list
int rb_range(struct rb_tree *tree, void *range, void *cookie, int (*comp)(const void *, const void *), int (*call)(void *, void *))
^
prog.c: In function 'rb_range':
prog.c:32:25: warning: implicit declaration of function 'rb_first' [-Wimplicit-function-declaration]
struct rb_node *node = rb_first(tree);
^
prog.c:32:25: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
prog.c:35:14: warning: comparison between pointer and integer
while (node != rb_nil(tree)) {
^
prog.c:36:30: error: dereferencing pointer to incomplete type 'struct rb_node'
if ((res = comp(range, node->data)) == 0) {
^
prog.c:37:21: warning: passing argument 1 of '_rb_range' from incompatible pointer type [-Wincompatible-pointer-types]
return _rb_range(tree, node, range, cookie, comp, call);
^
prog.c:1:12: note: expected 'struct rb_tree *' but argument is of type 'struct rb_tree *'
static int _rb_range(struct rb_tree *tree, struct rb_node *node, void *range, void *cookie, int (*comp)(const void *, const void *), int (*call)(void *, void *))
^
prog.c:37:27: warning: passing argument 2 of '_rb_range' from incompatible pointer type [-Wincompatible-pointer-types]
return _rb_range(tree, node, range, cookie, comp, call);
^
prog.c:1:12: note: expected 'struct rb_node *' but argument is of type 'struct rb_node *'
static int _rb_range(struct rb_tree *tree, struct rb_node *node, void *range, void *cookie, int (*comp)(const void *, const void *), int (*call)(void *, void *))
^