CCAN Archive mirror
 help / color / mirror / Atom feed
From: Ashok Raj <ashok.raj@intel.com>
To: <ccan@lists.ozlabs.org>
Subject: Re: [ccan] New to ccan
Date: Wed, 8 May 2024 16:34:10 -0700	[thread overview]
Message-ID: <ZjwL8iUYUeJQZl8m@a4bf019067fa.jf.intel.com> (raw)
In-Reply-To: <ZjqG3+l2c0MgkL5x@a4bf019067fa.jf.intel.com>

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.

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


/*
 * We wrap each word in a structure for type checking.
 */
typedef struct _bitmap {
	bitmap_word w;
} bitmap;


_______________________________________________
ccan mailing list
ccan@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/ccan

      reply	other threads:[~2024-05-08 23:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 19:54 [ccan] New to ccan Ashok Raj
2024-05-08 23:34 ` Ashok Raj [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZjwL8iUYUeJQZl8m@a4bf019067fa.jf.intel.com \
    --to=ashok.raj@intel.com \
    --cc=ccan@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).