Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!hao!oddjob!mimsy!chris From: chris@mimsy.UUCP Newsgroups: comp.bugs.4bsd Subject: lint hash.c is broken Message-ID: <8351@mimsy.UUCP> Date: Wed, 2-Sep-87 10:16:06 EDT Article-I.D.: mimsy.8351 Posted: Wed Sep 2 10:16:06 1987 Date-Received: Fri, 4-Sep-87 03:35:05 EDT Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 54 Index: usr.bin/lint/{Makefile,hash.c} 4.3BSD Fix Description: hash.c works only by chance, because it uses a parameter that is not passed to it. Repeat-by: Luck. The bug is obvious, however. Fix: hash.c needs to include config.h to get at FLEXNAMES; for it to do this, the Makefile must compile it with -I. RCS file: RCS/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -c2 -r1.1 -r1.2 *** /tmp/,RCSt1025511 Wed Sep 2 10:10:44 1987 --- /tmp/,RCSt2025511 Wed Sep 2 10:10:45 1987 *************** *** 93,97 **** lpass2.o: $M/manifest.h lmanifest.h pcclocal.h macdefs.h ${CC} ${CFLAGS} -c -I$M -I. lpass2.c ! lintall: lint -hpv -I. -I$M $M/cgram.c $M/xdefs.c $M/scan.c \ --- 93,100 ---- lpass2.o: $M/manifest.h lmanifest.h pcclocal.h macdefs.h ${CC} ${CFLAGS} -c -I$M -I. lpass2.c ! ! hash.o: hash.c ! ${CC} ${CFLAGS} -c -I$M -I. hash.c ! lintall: lint -hpv -I. -I$M $M/cgram.c $M/xdefs.c $M/scan.c \ RCS file: RCS/hash.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c2 -r1.1 -r1.2 *** /tmp/,RCSt1025518 Wed Sep 2 10:10:54 1987 --- /tmp/,RCSt2025518 Wed Sep 2 10:10:54 1987 *************** *** 3,6 **** --- 3,8 ---- #endif lint + #include "config.h" + /* * Hash function. Used for pass 2 symbol table and string table, -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: seismo!mimsy!chris