Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-spam!ames!oliveb!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.lang.c Subject: Re: Linting Malloc (Was: Re: Need help with pointer to array[][]) Message-ID: <15040@sun.uucp> Date: Fri, 13-Mar-87 20:31:33 EST Article-I.D.: sun.15040 Posted: Fri Mar 13 20:31:33 1987 Date-Received: Sat, 14-Mar-87 15:09:12 EST References: <132@batcomputer.tn.cornell.edu> <1911@utah-gr.UUCP> <5347@mimsy.UUCP> <1661@trwrb.UUCP> Sender: news@sun.uucp Reply-To: guy@sun.UUCP (Guy Harris) Organization: Sun Microsystems, Mountain View Lines: 16 Keywords: "warning: possible pointer alignment problem" > char *malloc(); > struct condition_rec *cond; > >lint (Pyramid 98X, 3.1 DualOSx, BSD Universe): > "warning: possible pointer alignment problem" > ... > hasn't. I there a way to get lint to pass this, make > this "more" portable ...? No, short of waiting for ANSI C, where there is a "void *" data type for "generic" pointers, and "malloc" returns a pointer of that type. Presumably pointers of this type could be converted to and from pointers of other types, in implementations that support "void *", without this "lint" warning. (Yes, there is still a possible alignment problem, but "lint" should assume that somebody writing a routine that constructs a "void *" value and returns it knows this already and has dealt with it.)