Article View: comp.sys.amiga.tech
Article #4844Re: malloc under Lattice C V5.05
From: Chris J Hillery
Date: Sun, 12 Aug 1990 17:58
Date: Sun, 12 Aug 1990 17:58
28 lines
1902 bytes
1902 bytes
bga@pnet51.orb.mn.org (Bruce Albrecht) writes:
>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.
>Am I misunderstanding something, or is the errata sheet wrong, or is there
>something wrong with Lattice C (either in the include or compiler)?
Here's a (sort of) related question: does it even matter if it gives you
a warning like this? Most cases when I get these warnings (type mismatch)
are either <a>my own dumb fault, which usually will crash if left in the
code, or <b>unimportant or outright intentional type mismatching (ie,
automatic type conversions for code efficiency). These programs have always
seemed to work right, even when I was given the warning (well, assuming it/
they were the ONLY warnings/errors, of course); am I missing something?
Is my code less effcient or corrupt or something if I leave these?
>UUCP: {amdahl!bungia, uunet!rosevax, crash}!orbit!pnet51!bga
>ARPA: crash!orbit!pnet51!bga@nosc.mil
>INET: bga@pnet51.orb.mn.org
--
//..is|While 1 DO|Erin,Erin,where are|Art of Noise space| -- Ceej (=
\X/there| Fork; |you? /-----------.-^------------------|ceej@pawl.rpi.edu
AMIGAany|----------^-----|Cebhq gb or|Reclaimer:Hey!That's| gmry@mts.rpi.edu
(=other?|HOW DO YOU FEEL.|Yvoreny! (=|mine! Bring it back!|aka Chris Hillery
Technical Details
Message-ID:
<V%$%LR_@rpi.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!rpi!ceejReferences:
<3034@orbit.cts.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!rpi!ceej From: ceej@pawl.rpi.edu (Chris J Hillery) Newsgroups: comp.sys.amiga.tech Subject: Re: malloc under Lattice C V5.05 Message-ID: <V%$%LR_@rpi.edu> Date: 12 Aug 90 17:58:45 GMT References: <3034@orbit.cts.com> Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 28