Commit f98c408e authored by Rusty Russell's avatar Rusty Russell

list: fix unused var warning.

/home/rusty/devel/cvs/ccan/ccan/list/list.h: In function ‘main’:
/home/rusty/devel/cvs/ccan/ccan/list/list.h:280:15: warning: variable ‘first’ set but not used [-Wunused-but-set-variable]

/home/rusty/devel/cvs/ccan/ccan/list/list.h: In function ‘main’:
/home/rusty/devel/cvs/ccan/ccan/list/list.h:304:15: warning: variable ‘last’ set but not used [-Wunused-but-set-variable]
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 3b4e940a
......@@ -279,6 +279,8 @@ static inline void list_del_from(struct list_head *h, struct list_node *n)
* Example:
* struct child *first;
* first = list_top(&parent->children, struct child, list);
* if (!first)
* printf("Empty list!\n");
*/
#define list_top(h, type, member) \
((type *)list_top_((h), list_off_(type, member)))
......@@ -301,6 +303,8 @@ static inline const void *list_top_(const struct list_head *h, size_t off)
* Example:
* struct child *last;
* last = list_tail(&parent->children, struct child, list);
* if (!last)
* printf("Empty list!\n");
*/
#define list_tail(h, type, member) \
((type *)list_tail_((h), list_off_(type, member)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment