public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "Pereira, D LailaX E" <d.lailax.e.pereira@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] ia-64 cast warning??
Date: Wed, 14 Nov 2001 18:16:46 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590698805513@msgid-missing> (raw)

Hi
Consider the following macro : executing in a program , on linux ia-64
machine: 
ifdef CIRC_DEBUG
#define CBUFSIZE 32768 
#define CHECK_CIRC_ALIGNMENT( A ) \
if (((unsigned int)(circbuff + A))%sizeof(caddr_t)) { A += (sizeof(caddr_t)
- (((unsigned int)(circbuff + A))%sizeof(caddr_t)))/sizeof(unsigned short);
}

#define CIRCADDR( A ) \
CHECK_CIRC_ALIGNMENT(CBptr) \
*(caddr_t *)(circbuff + CBptr) = A; \
CBptr = (CBptr + sizeof(caddr_t)/sizeof(short)) % CBUFSIZE;

#endif


int main(){
  unsigned int volatile* mask;
  unsigned short circbuff[CBUFSIZE];
  unsigned int CBptr;
  unsigned int current;
.....
  CHECK_CIRC_ALIGNMENT(current);
.....
}

I always get the warning : 
warning : cast from pointer to integer of different size  on the line
CHECK_CIRC_ALIGNMENT(current);

when I compile the above program.I want to get rid of the warning.I am not
able to figure out why I get this warning.??
Please let me know 

D'laila


             reply	other threads:[~2001-11-14 18:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-14 18:16 Pereira, D LailaX E [this message]
2001-11-14 18:26 ` [Linux-ia64] ia-64 cast warning?? Randolph Chung
2001-11-14 19:03 ` Dan Pop

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=marc-linux-ia64-105590698805513@msgid-missing \
    --to=d.lailax.e.pereira@intel.com \
    --cc=linux-ia64@vger.kernel.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