[ccan] rbtree.c build failure with gcc 4.5.1

Joseph Adams joeyadams3.14159 at gmail.com
Fri Jan 7 07:54:11 EST 2011


On Thu, Dec 16, 2010 at 11:37 PM, Scott Olson <scotto701 at gmail.com> wrote:
> On Tue, Dec 14, 2010 at 11:04 PM, Rusty Russell <rusty at rustcorp.com.au> wrote:
>
>> Hmm, interesting.  Joey is right, it's gcc complaining about &*(NULL).
>
> just an fyi.....gcc-4.5 warns about something in ccanlint as well....
>
> -scott
>
>
> [swo at dell-f14 ccan]$ make tools
> cc -g -Wall -Wstrict-prototypes -Wold-style-definition
> -Wmissing-prototypes -Wmissing-declarations -I. -MD -Werror   -c -o
> tools/ccanlint/ccanlint.o tools/ccanlint/ccanlint.c
> cc1: warnings being treated as errors
> tools/ccanlint/ccanlint.c: In function ‘main’:
> tools/ccanlint/ccanlint.c:454:2: error: taking address of expression
> of type ‘void’
> tools/ccanlint/ccanlint.c:460:2: error: taking address of expression
> of type ‘void’
> tools/ccanlint/ccanlint.c:462:2: error: taking address of expression
> of type ‘void’
> tools/ccanlint/ccanlint.c:465:2: error: taking address of expression
> of type ‘void’
> make: *** [tools/ccanlint/ccanlint.o] Error 1
>

I'm now on Fedora 14, and I get this, too.

Attached is a patch which fixes the issue the same way rbtree was
fixed 3 weeks ago.  Namely, it changes &*(ptr) to (ptr)+0 in a few
places.


Joey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warnings-20110106.diff
Type: text/x-patch
Size: 1685 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20110106/c6a1d69e/attachment.bin>


More information about the ccan mailing list