Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!snorkelwacker!ira.uka.de!smurf!nadia!bcstarc!root From: root@bcstarc.stgt.sub.org (Frank Pecher) Newsgroups: comp.sys.amiga.tech Subject: Re: malloc under Lattice C V5.05 Message-ID: <73@bcstarc.stgt.sub.org> Date: 14 Aug 90 00:05:03 GMT References: <3034@orbit.cts.com> Reply-To: root!bcstarc@nadia.UUCP (Frank Pecher) Organization: Boeblingen ComputerScienTific ARChive Lines: 24 In article <3034@orbit.cts.com> bga@pnet51.orb.mn.org (Bruce Albrecht) writes: >According to the errata sheet, malloc is type (void *), and that it should >not be necessary to put a cast in front of the return value. However, when >I had defined the following fragment: > char *outname; > > outname = malloc(SomeConstant); > >the compiler gave me a warning that the malloc was not the same type as >outname, and I had to change it to (char *) malloc to get rid of the warning. >[...] Which options did you use? I compiled with lc +L and got no warnings of any kind, and the executable worked ok. I have version 5.05, too. >UUCP: {amdahl!bungia, uunet!rosevax, crash}!orbit!pnet51!bga >ARPA: crash!orbit!pnet51!bga@nosc.mil >INET: bga@pnet51.orb.mn.org -- Frank -- Frank Pecher uucp: root@bcstarc.stgt.sub.org ==> (This line intentionally left blank) <==