Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcnc!rti!dg_rtp!throopw From: throopw@dg_rtp.UUCP (Wayne Throop) Newsgroups: comp.lang.c Subject: Re: declaration placements and fgets (query) Message-ID: <1924@dg_rtp.UUCP> Date: Mon, 18-May-87 10:54:32 EDT Article-I.D.: dg_rtp.1924 Posted: Mon May 18 10:54:32 1987 Date-Received: Tue, 19-May-87 03:39:15 EDT References: <1899@trwrb.UUCP> <6716@mimsy.UUCP> Lines: 18 > chris@mimsy.UUCP (Chris Torek) >> ries@trwrb.UUCP (Marc Ries) >>... the core dump is entirely dependent upon whether the char *line >>comes before or after the FILE *fp, *fopen() declaration. > The variable is *not* initialised, hence it contains trash. Worth noting: lint would have caught this error. Moral: use lint. I think there is only one valid justification for not using type and usage checking tools like lint. And that's if they aren't available to you. -- "He's more than just a Galaxy Ranger.... He's a Super-Trooper!" --- From "The Adventures of the Galaxy Rangers" -- Wayne Throop !mcnc!rti!dg_rtp!throopw