1 lclint +posixlib unsignedcompare.c -expect 2
3 unsignedcompare.c: (in function test)
4 unsignedcompare.c:5:3: Assignment of ssize_t to unsigned long int:
5 res = read(fd, buffer, cnt)
6 To allow arbitrary integral types to match long unsigned, use
8 unsignedcompare.c:7:7: Comparison of unsigned value involving zero: res <= 0
9 An unsigned value is used in a comparison with zero in a way that is either a
10 bug or confusing. (-unsignedcompare will suppress message)
11 unsignedcompare.c:12:7: Comparison of unsigned value involving zero: res < 0
12 unsignedcompare.c:12:18: Comparison of unsigned value involving zero: res >= 0
14 Finished LCLint checking --- 4 code errors found, expected 2