- 论坛徽章:
- 0
|
没用过pclint,但每个lint工具都应当带一些默认规则。除非你要定制自己的lint规则库,不过我觉得默认规则应当够用了。
- Splint 3.1.1 --- 21 Apr 2006
- type.c: (in function main)
- type.c:6:6: Assignment of int to unsigned char: a = 0
- Types are incompatible. (Use -type to inhibit warning)
- type.c:6:10: Operands of < have incompatible types (unsigned char, unsigned
- short int): a < b
- To make char and int types equivalent, use +charint.
- type.c:6:14: Operand of ++ is non-numeric (unsigned char): a
- type.c:6:10: Incompatible types for < (unsigned char, unsigned short int) (in
- post loop test): a < b
- type.c:8:2: Path with no return in function declared to return int
- There is a path through a function declared to return a value on which there
- is no return statement. This means the execution may fall through without
- returning a meaningful result to the caller. (Use -noret to inhibit warning)
- Finished checking --- 5 code warnings
复制代码
你的代码的问题应当已经暴露出来了。虽然这样错误还是不明显。 |
|