Subject: Re: making programs 64bit clean
To: Tim Rightnour <root@garbled.net>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-alpha
Date: 06/18/1998 17:42:47
On Thu, 18 Jun 1998 06:28:08 -0700 (MST) 
 Tim Rightnour <root@garbled.net> wrote:

 > I'm trying to make a pkg 64bit clean, and am running into an error that has me
 > stumped.  I resorted to typecasting just about everything, and Managed to cut
 > the offending code down to one line:
 > 
 > int i;
 >   (char **)malloc(i * sizeof(char **));
 > which returns: 
 > warning: cast to pointer from integer of different size
 > 
 > I've tried making i long, making the args to malloc (size_t),  I'm at a
 > complete loss here, any help would be appreciated.  Thanks.

Include <stdlib.h> ... i.e. bring the malloc(3) prototype into scope.

You might compile GCC w/ the prototype warnings enabled.

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 428 6939