[PATCH 1/5] erofs-utils: lib: rb_tree: fix broken rb_iter_init() prototype
Gao Xiang
hsiangkao at linux.alibaba.com
Sun Apr 9 22:26:02 AEST 2023
On 2023/4/9 19:56, Ahelenia Ziemiańska wrote:
> In file included from rb_tree.c:34:
> ./rb_tree.h:96:17: warning: a function declaration without a prototype
> is deprecated in all versions of C and is treated as a zero-parameter
> prototype in C2x, conflicting with a subsequent definition
> [-Wdeprecated-non-prototype]
> struct rb_iter *rb_iter_init ();
> ^
> rb_tree.c:422:1: note: conflicting prototype is here
> rb_iter_init (struct rb_iter *self) {
> ^
>
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli at nabijaczleweli.xyz>
Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>
Thanks,
Gao Xiang
> ---
> lib/rb_tree.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/rb_tree.h b/lib/rb_tree.h
> index 5b35c74..67ec0a7 100644
> --- a/lib/rb_tree.h
> +++ b/lib/rb_tree.h
> @@ -93,7 +93,7 @@ int rb_tree_remove_with_cb (struct rb_tree *self, void *value, rb_t
> int rb_tree_test (struct rb_tree *self, struct rb_node *root);
>
> struct rb_iter *rb_iter_alloc ();
> -struct rb_iter *rb_iter_init ();
> +struct rb_iter *rb_iter_init (struct rb_iter *self);
> struct rb_iter *rb_iter_create ();
> void rb_iter_dealloc (struct rb_iter *self);
> void *rb_iter_first (struct rb_iter *self, struct rb_tree *tree);
More information about the Linux-erofs
mailing list