Commit 919b97d6 authored by Rusty Russell's avatar Rusty Russell

tlist: remove unused var warning in example.

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

Compiler:
/home/rusty/devel/cvs/ccan/ccan/tlist/tlist.h: In function ‘main’:
/home/rusty/devel/cvs/ccan/ccan/tlist/tlist.h:205:15: warning: variable ‘last’ set but not used [-Wunused-but-set-variable]
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 70843363
......@@ -185,6 +185,8 @@
* Example:
* struct child *first;
* first = tlist_top(&parent->children, list);
* if (!first)
* printf("Empty list!\n");
*/
#define tlist_top(h, member) \
((tcon_type((h), canary)) \
......@@ -202,6 +204,8 @@
* Example:
* struct child *last;
* last = tlist_tail(&parent->children, list);
* if (!last)
* printf("Empty list!\n");
*/
#define tlist_tail(h, member) \
((tcon_type((h), canary)) \
......
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