[ccan] New to ccan
David Gibson
david at gibson.dropbear.id.au
Mon Jun 3 13:56:33 AEST 2024
On Sat, Jun 01, 2024 at 07:23:07PM +1000, David Gibson wrote:
> On Wed, May 08, 2024 at 04:34:10PM -0700, Ashok Raj wrote:
> > On Tue, May 07, 2024 at 12:54:07PM -0700, Ashok Raj wrote:
> > > Hi
> > >
> > > I'm new to ccan. I'm trying to use just part of the project (just one
> > > module) in another tool.
> > >
> > > I didn't catch the exact method to replicate a single module.
>
> As I recall, we talked about this a bit, but never did come up with a
> great method.
>
> > So I went past this step and able to include it in my project.
> >
> > But I see the following warning
> >
> > [16/247] Compiling C object libccan.a.p/ccan_bitmap_bitmap.c.o
> > In file included from ../ccan/bitmap/bitmap.c:5:
> > ../ccan/bitmap/bitmap.h: In function bitmap_set_bit:
> > ../ccan/bitmap/bitmap.h:61:43: warning: declaration of bitmap shadows a global declaration [-Wshadow]
> > 61 | static inline void bitmap_set_bit(bitmap *bitmap, unsigned long n)
> > | ~~~~~~~~^~~~~~
> > ../ccan/bitmap/bitmap.h:26:3: note: shadowed declaration is here
> > 26 | } bitmap;
> > | ^~~~~~
> >
> >
> > If I were to change the parameter name to _bitmap and in all usages the
> > warning disappears. Weird the definition its pointing to is this
> > typedewf
>
> Huh. Looks like the code is relying on types and variables/parameters
> being in different namespaces, but that warning doesn't like that. I
> guess we must not have had the relevant warning enabled before.
>
> I made a fix, but it's been so long since I pushed things to the ccan
> repo, I've forgotten how and will have to figure it out again.
Ok, I figured it out. Fix is now pushed to https://github.com/rustyrussell/ccan.git
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20240603/ac4729c4/attachment.sig>
More information about the ccan
mailing list