[ccan] rbtree.c build failure with gcc 4.5.1

Rusty Russell rusty at rustcorp.com.au
Fri Jan 7 13:42:04 EST 2011


On Fri, 7 Jan 2011 07:24:11 am Joseph Adams wrote:
> 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.

Thanks.  ccanlint running on opt gave the same warnings, and your patch
fixed them all.

Thanks!
Rusty.


More information about the ccan mailing list