Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!yahoo From: yahoo@unix.cis.pitt.edu (Kenneth L Moore) Newsgroups: comp.lang.c Subject: Re: (void *) ? /* again */ Keywords: coerce Message-ID: <21781@unix.cis.pitt.edu> Date: 22 Jan 90 19:28:55 GMT References: <6200009@ux1.cso.uiuc.edu> <21771@unix.cis.pitt.edu> <1990Jan22.103543.7116@virtech.uucp> Reply-To: yahoo@unix.cis.pitt.edu (Kenneth L Moore) Organization: Univ. of Pittsburgh, Comp & Info Services Lines: 20 In article <1990Jan22.103543.7116@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes: >In article <21771@unix.cis.pitt.edu>, yahoo@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