From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: 111c93,291fed1fcb5003a7 X-Google-Attributes: gid111c93,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: =?iso-8859-1?q?M=E5ns_Rullg=E5rd?= Newsgroups: comp.os.linux.alpha Subject: Re: warnings during compilation Date: Mon, 08 Nov 2004 14:30:49 +0100 Message-ID: References: <48383449.0411080523.42a26ca1@posting.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de s35VBMEB540CDhotoMyRXAZkRahRqCb9xTe6mNWaHX2W1dERL0 User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:y8MsqtCOthlZCi6gxdpT1zRiymg= Xref: g2news1.google.com comp.os.linux.alpha:321 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