[ccan] Testing ccanlint on Cygwin (gcc 4.3.4-3)

Joseph Adams joeyadams3.14159 at gmail.com
Wed Mar 16 16:06:19 EST 2011


On Thu, Mar 10, 2011 at 7:20 PM, Rusty Russell <rusty at rustcorp.com.au> wrote:
> Meanwhile, we have four options:
>
> (1) Create ccan wrappers which warn (using __builtin_compatible_p).
> (2) Create ccan wrappers which fix (using an extra test, maybe getting
>    tricky with __builtin_compatible_p to optimize)
> (3) Create ccan replacements, eg. cisupper etc.
> (4) Fix our own code then stick our heads back in the sand.

Here's one idea:

 1.) Add a ccanlint test that compiles the program (and maybe even
runs the tests), replacing invocations of ctype functions with
wrappers that warn.
 2.) Create a CCAN module containing a different set of wrappers which
instead cast to unsigned char.

The former would blanket CCAN with tests for incorrect usage, while
the latter would come in handy for modules that aren't standalone and
would suffer little from one more dependency.


Joey


More information about the ccan mailing list