lseek problem

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Oct 7 12:01:11 AEST 1989


In article <20065 at mimsy.UUCP> lint at mimsy.umd.edu (The Lint Program) writes:
>In article <14657 at uhnix1.uh.edu> jsmng at sysmgr.cs.uh.edu writes:
>[c code deleted]
>t.c:
>t.c(5): warning: argument argc unused in function main
>lseek, arg. 1 used inconsistently	llib-lc(90)  ::  t.c(19)
>lseek, arg. 2 used inconsistently	llib-lc(90)  ::  t.c(19)
>lseek value used inconsistently	llib-lc(90)  ::  t.c(19)
>lseek value declared inconsistently	llib-lc(90)  ::  t.c(19)
>printf returns value which is always ignored

"lint" missed some other problems:
exit() misdeclared
lseek() return comparison against NULL is wrong
fgetc() return not compared against EOF
<sys/file.h> L_SET should not be used in an application
...

"What is wrong with this program?" reminded me of the "What is wrong
with this picture?" puzzles in children's books.  Often my reaction
was, "What is RIGHT with this picture?".



More information about the Comp.lang.c mailing list