Re: [ccan] New to ccan
David Gibson <[email protected]> Sat, 1 Jun 2024 19:23:07 +1000
| Newsgroups | org.ozlabs.lists.ccan |
|---|---|
| Message-ID | <Zlroeyxsa_d80DuA@zatzit> |
--===============9144317410404193508== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rr6AdlL9jklEc2VN" Content-Disposition: inline --rr6AdlL9jklEc2VN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > >=20 > > I'm new to ccan. I'm trying to use just part of the project (just one > > module) in another tool.=20 > >=20 > > 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. >=20 > But I see the following warning >=20 > [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 g= lobal 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; > | ^~~~~~ >=20 >=20 > 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. Speaking of which... ccan is largely moribund at this point. Neither Rusty nor I has any real time to devote to it. And in my case, collecting C examples - even very nice ones - has become a lot compelling with the emergence of viable alternative systems programming languages (Rust, Go, Zig). --=20 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 --rr6AdlL9jklEc2VN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmZa6GUACgkQzQJF27ox 2GcWMQ/+JotSsUCRAcGzFqPlfQMo2j0ul7mluB3nnOaNatx2IYhVvkjuA5AstWim 96kIHCQf90lL4W2bY6pW8BIRJ2C349pMlKMqy0LKqAz4IPAWHXJHybG8ySbtMfmV qEsojLYiz6Vfx9VTvEshIBUh2H+oyDVme5l8ivZZOABL7AbhlNGAWsF7KTD6/X9f KI7dSVrkxeWiJ3rQCybgnTsoP42nl7ySDmN/5WashNytOo7dieQSYkUIondxAAZD 3jlTsq+Lyb2v7L1/W6l9By54PId57cmEQKW0jGmR57I3H5ERnfqwUKbhZJW6RhOz d7TvzP45EHPiBZ7OhMhacAgkAbo8204CvJmdHaordlFwM9dSG+lV4FOkexHVLEoV HyKbPfOZQAyjdyHw0GZbm0wrUMd/M+qPRlYo8216YQDKIwQq57EIPTrTuF7YiqYl XPoBBXlB+X2UidffWZ24ARM0jlNtnQDDajM03/kiReFVvRf56OuzGnBmbwp/DBuY xZXJL5ioWy03iLtdQdSsJcOIj1OKi7488Ilh56ihBgbPmWp1wSm9KJmq3ml2CTqK uUQ6hiCqDBCUOKqzqaFtw1MziyDOfhsOCdrDL50pFC3UClKbiT0AXhTDr8QQ7Hf9 pd3hqFA3gVxlkXFOBK15TchSQv2z39pu5VK+EOCLOyyPkKQPxiM= =17t8 -----END PGP SIGNATURE----- --rr6AdlL9jklEc2VN-- --===============9144317410404193508== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ccan mailing list [email protected] https://lists.ozlabs.org/listinfo/ccan --===============9144317410404193508==--