Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!cmcl2!rutgers!clyde!cbosgd!cwruecmp!hal!ncoast!tdi2!brandon From: brandon@tdi2.UUCP (Brandon Allbery) Newsgroups: comp.unix.questions Subject: Re: Shutting lint up about malloc (missing /*NOSTRICT*/) Message-ID: <358@tdi2.UUCP> Date: Fri, 22-May-87 19:22:00 EDT Article-I.D.: tdi2.358 Posted: Fri May 22 19:22:00 1987 Date-Received: Tue, 26-May-87 00:55:22 EDT References: <61@amanue.UUCP> <1994@a.cs.okstate.edu> Reply-To: brandon@tdi2.UUCP (Brandon Allbery) Followup-To: comp.unix.questions Organization: Tridelta Industries, Inc., Mentor, Ohio Lines: 28 Quoted from <1994@a.cs.okstate.edu> ["Re: Shutting lint up about malloc (missing /*NOSTRICT*/)"], by gregg@a.cs.okstate.edu (Gregg Wonderly)... +--------------- | in article <61@amanue.UUCP>, jr@amanue.UUCP (Jim Rosenberg) says: | > | > This is driving me nuts. I can't get lint on my system to shut up about | > malloc. In response to the following code: | > | ...... | > | > /*NOSTRICT*/ | > if ((p = (struct foo*) malloc(sizeof(struct foo))) == NULL) { | > (void) fprintf(stderr, "Out er memory, turkey\n"); | > return NULL; | > } +--------------- Even with the proposed change (casting NULL) lint -p will still yell about casting malloc()'s result. The document (NOT man page) for lint mentions a -c option to silence this here, but /usr/bin/lint (which is a shell script) contains a comment to the effect that lint -c is obsolete and unused. (This is System V Release 2, and actually lint -c produces .ln files.) ++Brando -- Brandon S. Allbery UUCP: cbatt!cwruecmp!ncoast!tdi2!brandon Tridelta Industries, Inc. CSNET: ncoast!allbery@Case 7350 Corporate Blvd. INTERNET: ncoast!allbery%Case.CSNET@relay.CS.NET Mentor, Ohio 44060 PHONE: +1 216 255 1080 (home +1 216 974 9210)