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>
hex: Simplify hex_encode The documentation for hex_encode indicates that it returns simply true or false. The old implementation was returning the written length on success, cast to boolean. This will elicit a warning under MSVC. On further examination, there is no need to check/modify the length inside the loop, since we can check it once before starting. As a result the code can be simplified a bit. A side affect of this change is that nothing will be written at all if the length is incorrect, vs the previous code writing characters until the length available is exhausted. I prefer the new semantics but YMMV. Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
ccan: Correct some poor conventions in _info includes There are a couple of small problems with the includes used in most of ccan's _info files. * _info routinely uses printf(), and so should include <stdio.h>, but only some of them do. We get away with it, because they do include <string.h>, which apparently includes <stdio.h> indirectly, but we should be explicit about it. * Most _info files were including config.h after the system headers. That _seems_ sensible, but actually causes problems. Because config.h defines _GNU_SOURCE it can change the behaviour of the system headers. More specifically it can make them behave differently to how the individual module headers (which have included config.h) expects them to behave. This patch adjusts all the existing _info files and, more importantly, the template constructed by ccanlint. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Relicense all public domain modules to CC0. I wrote all of most of them, for the others, here's the CCAN mailing list thread authorizing it: From: Timothy B. Terriberry <tterribe@xiph.org> Subject: Re: [ccan] Changing from Public Domain to CC0 To: Rusty Russell <rusty@rustcorp.com.au> Cc: ccan@ozlabs.org Date: Wed, 31 Oct 2012 02:53:50 -0400 Rusty Russell <rusty@rustcorp.com.au> wrote: > I want to change the License string (and add a symlink) to the following > trivial modules. Please Ack. > isaac Ack. From: Alessandro Guido <ag@alessandroguido.name> Subject: Re: Changing from Public Domain to CC0 To: Rusty Russell <rusty@rustcorp.com.au> Date: Wed, 31 Oct 2012 10:59:53 +0100 Acked-by: Alessandro Guido <ag@alessandroguido.name> From: Brad Hards <bradh@frogmouth.net> Subject: Re: Changing from Public Domain to CC0 To: Rusty Russell <rusty@rustcorp.com.au> Cc: Joey Adams <joeyadams3.14159@gmail.com>, Alessandro Guido <ag@alessandroguido.name>, Andreas Schlick <schlick@lavabit.com>, ccan@ozlabs.org Date: Wed, 31 Oct 2012 23:43:24 +1100 On 31/10/12 17:43, Rusty Russell wrote: > Damn lawyers! > > Since Public Domain is a slippery concept outside certain countries, it > has been suggested that I formalize it to Creative Commons Zero. > > I want to change the License string (and add a symlink) to the following > trivial modules. Please Ack. Ack. More generally, anything I've put into CCAN is so trivial that you can relicense it (to any Free / Open Source license) as part of any relicensing you can otherwise get agreement to. Brad [Sorry if this comes out in HTML - I'm stuck with unsat tools while travelling]. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
various: make the _info License: wording uniform for GPL variants. GPL versions 2 and 3 both specifically mention "any later version" as the phrase which allows the user to choose to upgrade the license. Make sure we use that phrase, and make the format consistent across modules.
str: fix tests on unsigned chars, and !HAVE_ISBLANK.