Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* warnings during compilation
@ 2004-11-08 13:23 krishnakant
  2004-11-08 13:30 ` Måns Rullgård
  0 siblings, 1 reply; 2+ messages in thread
From: krishnakant @ 2004-11-08 13:23 UTC (permalink / raw)


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



Regards,
Kant


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: warnings during compilation
  2004-11-08 13:23 warnings during compilation krishnakant
@ 2004-11-08 13:30 ` Måns Rullgård
  0 siblings, 0 replies; 2+ messages in thread
From: Måns Rullgård @ 2004-11-08 13:30 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-08 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-08 13:23 warnings during compilation krishnakant
2004-11-08 13:30 ` Måns Rullgård

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox