[ccan] [PATCH] bitmap: add endianness casts

Rusty Russell rusty at rustcorp.com.au
Wed Jan 15 14:37:31 EST 2014


David Gibson <david at gibson.dropbear.id.au> writes:
> On Thu, Dec 19, 2013 at 10:43:24PM -0500, Emilio G. Cota wrote:
>> On Fri, Dec 20, 2013 at 12:49:35 +1100, David Gibson wrote:
>> > Is there an easy way to run sparse over ccan modules?
>> 
>> The ones that end up in an object file are easy to check.
>> Just `CC=cgcc make' from ccan's top directory.
>> 
>> A header-only module is a bit uglier to deal with. A quick
>> way of running it through sparse is to run ccanlint from
>> the module's directory, passing cgcc as the compiler to ccanlint:
>> 
>>   $ ../../tools/ccanlint/ccanlint --compiler=cgcc -v | grep -v '\.o:'
>
> Ah, thanks.
>
>> Removing warning messages for object files is useful; cgcc seems to
>> try to feed sparse object files, which results in a lot of useless
>> warnings.
>
> Hrm.  That's probably cgcc misinterpreting what to do when it's
> invoked as a linker only.
>
>> Note that this procedure works as long as there is a test program.
>
> Ok.
>
>
> Hey, Rusty, any chance of integrating sparse support into ccanlint?

Hmm, the Ubuntu package doesn't even get that far for x86-64:

/home/rusty/devel/cvs/ccan/ccan/likely/test/run.c:Compile gave warnings:
/usr/include/stdc-predef.h:30:11: error: unable to open 'bits/predefs.h'
..

As it seems that sparse in unmaintained, I don't think adding support is
a good idea.

Disappointing!
Rusty.


More information about the ccan mailing list