From: "Måns Rullgård" <mru@inprovide.com>
Subject: Re: warnings during compilation
Date: Mon, 08 Nov 2004 14:30:49 +0100 [thread overview]
Message-ID: <yw1xwtwwwjqu.fsf@ford.inprovide.com> (raw)
In-Reply-To: 48383449.0411080523.42a26ca1@posting.google.com
kant2073@yahoo.com (krishnakant) writes:
> Hi,
>
> Iam porting a c application code source files from tru64 os on alpha
> to ia64 on debian linux kernel 2.6 iam getting the following errors
> will u kindly help me in this regard
>
> scn_buffer.c:52: warning: cast to pointer from integer of different
> size
> scn_buffer.c:57: warning: cast to pointer from integer of different
> size
>
> uabgembt@112-27A:~/kant/kant1/kant2$ gcc -c scn_timer.c
> scn_timer.c: In function `tm_start':
> scn_timer.c:193: warning: cast to pointer from integer of different
> size
Those warnings mean you are doing something like
int i = 0;
void *p = (void *) i;
and sizeof(int) != sizeof(void *).
Are you seeing these warnings on ia64 but not on Alpha? Then you are
probably casting a long to a pointer. On Alpha, long is 64 bits, as
well as pointers. It could be that your compiler uses 32-bit longs on
ia64, I don't have one of those, so I don't know. If this is the
case, change the offending long variables to long long, which should
be 64 bits.
--
M�ns Rullg�rd
mru@inprovide.com
prev parent reply other threads:[~2004-11-08 13:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-08 13:23 warnings during compilation krishnakant
2004-11-08 13:30 ` Måns Rullgård [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox