[PATCH 1/5] erofs-utils: lib: rb_tree: fix broken rb_iter_init() prototype

Ahelenia Ziemiańska nabijaczleweli at nabijaczleweli.xyz
Sun Apr 9 21:56:18 AEST 2023


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>
---
 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);
-- 
2.30.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linux-erofs/attachments/20230409/f5b3473f/attachment.sig>


More information about the Linux-erofs mailing list