lint bug

Andries Brouwer aeb at mcvax.UUCP
Fri Aug 26 06:16:44 AEST 1983


A program like
	extern long lseek();
	
	main(){
	        (void) lseek(0, 0L, 0);
	}
causes lint (BSD 4.1c) when called as  lint -a prog.c  to complain
	prog.c:
	prog.c(4): warning: long assignment may lose accuracy
which seems fairly ridiculous.
The following change fixes this.
$ diff lint.c /usr/src/usr.bin/lint/lint.c
648,649c648
<               if( aflag && (tl==LONG || tl==ULONG)
<                         && (t!=LONG && t!=ULONG && t!=UNDEF) ){
---
>               if( aflag && (tl==LONG||tl==ULONG) && (t!=LONG&&t!=ULONG) ){
-- 
      Andries Brouwer -- Math. Centr., Amsterdam -- {philabs,decvax}!mcvax!aeb



More information about the Comp.unix.wizards mailing list