home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
lclint.zip
/
lclint-2_3h-os2-bin.zip
/
test
/
charlit.expect
< prev
next >
Wrap
Text File
|
1997-09-03
|
1KB
|
30 lines
charlit.c: (in function f)
charlit.c:3,11: Variable x initialized to type char, expects int: 'a'
A character constant is used as an int. Use +charintliteral to allow
character constants to be used as ints. (This is safe since the actual type
of a char constant is int.)
charlit.c:6,7: Incompatible types for + (int, char): x + 'c'
charlit.c:8,10: Return value type char does not match declared type int: 'a'
charlit.c:12,14: Variable u initialized to type int, expects unsigned int: -3
To ignore signs in type comparisons use +ignoresigns
Finished LCLint checking --- 4 code errors found, as expected
charlit.c: (in function f)
charlit.c:3,11: Variable x initialized to type char, expects int: 'a'
A character constant is used as an int. Use +charintliteral to allow
character constants to be used as ints. (This is safe since the actual type
of a char constant is int.)
charlit.c:4,14: Variable z initialized to type int, expects double: 3
An int literal is used as a float or double. Use +numliteral to allow int
literals to be used as floats or doubles.
charlit.c:6,7: Incompatible types for + (int, char): x + 'c'
charlit.c:8,10: Return value type char does not match declared type int: 'a'
charlit.c:12,14: Variable u initialized to type int, expects unsigned int: -3
To ignore signs in type comparisons use +ignoresigns
Finished LCLint checking --- 5 code errors found, as expected
Finished LCLint checking --- no code errors found