(void *) ? /* again */

Kenneth L Moore yahoo at unix.cis.pitt.edu
Tue Jan 23 06:28:55 AEST 1990


In article <1990Jan22.103543.7116 at virtech.uucp> cpcahil at virtech.uucp (Conor P. Cahill) writes:
>In article <21771 at unix.cis.pitt.edu>, yahoo at unix.cis.pitt.edu (Kenneth L Moore) writes:

=>Never use malloc() without declaring it as returning a pointer.  The 
=>cast you list will get rid of the warning from most compilers and
=>will not have any detrimental effect on the program.  However, 
=>removing the declaration for the malloc() can have a very bad effect
=>on the program on some systems. 
=>-- 
=>+-----------------------------------------------------------------------+
=>| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
=>| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
=>+-----------------------------------------------------------------------+

Thanks for the tip. I guess I've just been lucky on our systems here.
(I've never had any problems on our ultrix, sun unix or VAX)


-- 
I don't yell and I don't tell and I'm grateful as hell: Benny Hill



More information about the Comp.lang.c mailing list