Article View: comp.sys.amiga.tech
Article #4877Re: malloc under Lattice C V5.05
From: Frank Pecher
Date: Tue, 14 Aug 1990 00:05
Date: Tue, 14 Aug 1990 00:05
24 lines
1422 bytes
1422 bytes
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 <prog> 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) <==
Technical Details
Message-ID:
<73@bcstarc.stgt.sub.org>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!snorkelwacker!ira.uka.de!smurf!nadia!bcstarc!rootReferences:
<3034@orbit.cts.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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