From: Rusty Russell Date: Wed, 29 May 2024 05:31:03 +0000 (+0930) Subject: io: clean up compiler warning. X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=c5c87890f3441856fff4b50861c52e85ee2f41f4;p=ccan io: clean up compiler warning. ``` /home/rusty/devel/cvs/ccan/ccan/io/test/run-08-read-after-hangup.c: In function ‘main’: /home/rusty/devel/cvs/ccan/ccan/io/io.h:62:58: warning: declaration of ‘conn’ shadows a previous local [-Wshadow=compatible-local] 62 | struct io_conn *conn), \ | ~~~~~~~~~~~~~~~~^~~~ /home/rusty/devel/cvs/ccan/ccan/typesafe_cb/typesafe_cb.h:35:46: note: in definition of macro ‘typesafe_cb_cast’ 35 | oktype), \ | ^~~~~~ /home/rusty/devel/cvs/ccan/ccan/io/io.h:60:22: note: in expansion of macro ‘typesafe_cb_preargs’ 60 | typesafe_cb_preargs(struct io_plan *, void *, \ | ^~~~~~~~~~~~~~~~~~~ /home/rusty/devel/cvs/ccan/ccan/io/test/run-08-read-after-hangup.c:42:9: note: in expansion of macro ‘io_new_conn’ 42 | io_new_conn(conn, fds[1], init_writer, conn); | ^~~~~~~~~~~ /home/rusty/devel/cvs/ccan/ccan/io/test/run-08-read-after-hangup.c:36:25: note: shadowed declaration is here 36 | struct io_conn *conn; | ^~~~ ``` --- diff --git a/ccan/io/io.h b/ccan/io/io.h index cc92be2c..5d084828 100644 --- a/ccan/io/io.h +++ b/ccan/io/io.h @@ -59,7 +59,7 @@ struct io_conn; io_new_conn_((ctx), (fd), \ typesafe_cb_preargs(struct io_plan *, void *, \ (init), (arg), \ - struct io_conn *conn), \ + struct io_conn *), \ (void *)(arg)) struct io_conn *io_new_conn_(const tal_t *ctx, int fd,