Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!topaz!bentley!kwh From: kwh@bentley.UUCP (KW Heuer) Newsgroups: net.lang.c Subject: Re: questions from using lint Message-ID: <830@bentley.UUCP> Date: Thu, 15-May-86 23:43:01 EDT Article-I.D.: bentley.830 Posted: Thu May 15 23:43:01 1986 Date-Received: Sat, 17-May-86 05:03:49 EDT References: <640@bunkerb.UUCP> Organization: AT&T Bell Laboratories, Liberty Corner Lines: 17 In article <640@bunkerb.UUCP> bunkerb!garys (Gary Samuelson) writes: >In article <797@bentley.UUCP> kwh@bentley.UUCP (KW Heuer) writes: >>(It's too bad lint can't tell whether you've tested the return value of >>open(), etc.) > >??? Lint certainly can check for that (at least the lint I use); it says >something like "open returns value which is sometimes ignored" By "open(), etc." I meant the class a functions which return a useful value even when they succeed. For example, lint does *not* catch the following: fp = fopen(fname, "r"); c = getc(fp); which is a potential error because fopen() could return NULL. Trouble is, even if lint knew that fopen had such an error return, it would have to know whether getc() is prepared to handle it (it isn't). Karl W. Z. Heuer (ihnp4!bentley!kwh), The Walking Lint