Mark unused arguments in many modules. Either with UNNEEDED (if the module already used ccan/compiler) or with (void) casting. The only other change is in ccan/list/test/run-CCAN_LIST_DEBUG.c, because the linenumbers change and thus it needs updating. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Remove unused main() args in many modules. This makes us closer to compiling cleanly with -Wunused (as used by -Wextra). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
typesafe_cb: don't use HAVE_CAST_TO_UNION in tests. This crept in, it should be the same as the tests in typesafe_cb.h.
typesafe_cb: simplify, preserve namespace. Get rid of many variants, which were just confusing for most people. Keep typesafe_cb(), typesafe_cb_preargs() and typesafe_cb_postarts(), and rework cast_if_type() into typesafe_cb_cast() so we stay in our namespace. I should have done this as soon as I discovered the limitation that the types have to be defined if I want const-taking callbacks.