Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!ucbvax!cartan!brahms!desj From: desj@brahms (David desJardins) Newsgroups: comp.lang.c Subject: Re: NULL pointers Message-ID: <313@cartan.Berkeley.EDU> Date: Sat, 15-Nov-86 22:32:13 EST Article-I.D.: cartan.313 Posted: Sat Nov 15 22:32:13 1986 Date-Received: Sun, 16-Nov-86 06:28:12 EST References: <1696@ncoast.UUCP> Sender: daemon@cartan.Berkeley.EDU Reply-To: desj@brahms (David desJardins) Distribution: comp Organization: Math Dept. UC Berkeley Lines: 19 In article <1696@ncoast.UUCP> kent@ncoast.UUCP (Kent Williams) writes: >[...] It seems supremely asinine that Microsoft C complains about > >struct nameless x; >x = malloc(sizeof(struct nameless)); Maybe I'm confused, but this seems completely wrong (you are assigning a pointer to an object). Do you perhaps mean struct nameless *x; ? If so, you should really write x = (struct nameless *) malloc (sizeof (struct nameless)); as this is what casts are for. It doesn't seem asinine at all to give a warning about this. -- David desJardins