]> andersk Git - splint.git/blame - test/charlit.expect
noexpand always false.
[splint.git] / test / charlit.expect
CommitLineData
885824d3 1
2charlit.c: (in function f)
3charlit.c:3:11: Variable x initialized to type char, expects int: 'a'
4 A character constant is used as an int. Use +charintliteral to allow
5 character constants to be used as ints. (This is safe since the actual type
6 of a char constant is int.)
7charlit.c:6:7: Incompatible types for + (int, char): x + 'c'
8charlit.c:8:10: Return value type char does not match declared type int: 'a'
9charlit.c:12:14: Variable u initialized to type int, expects unsigned int: -3
10 To ignore signs in type comparisons use +ignoresigns
11
11db3170 12Finished checking --- 4 code warnings, as expected
885824d3 13
14charlit.c: (in function f)
15charlit.c:3:11: Variable x initialized to type char, expects int: 'a'
16 A character constant is used as an int. Use +charintliteral to allow
17 character constants to be used as ints. (This is safe since the actual type
18 of a char constant is int.)
19charlit.c:4:14: Variable z initialized to type int, expects double: 3
20 An int literal is used as any numeric type (including float and long long).
21 Use +numliteral to allow int literals to be used as any numeric type.
22charlit.c:6:7: Incompatible types for + (int, char): x + 'c'
23charlit.c:8:10: Return value type char does not match declared type int: 'a'
24charlit.c:11:18: Initial value of s[1] is type int, expects short int: -1
25 To ignore type qualifiers in type comparisons use +ignorequals.
26charlit.c:12:14: Variable u initialized to type int, expects unsigned int: -3
27 To ignore signs in type comparisons use +ignoresigns
28
11db3170 29Finished checking --- 6 code warnings, as expected
885824d3 30
e5081f8c 31charlit.c: (in function f)
32charlit.c:6:3: Assignment of double to int: x = x + 'c' + 2 + z
33 To allow all numeric types to match, use +relaxtypes.
34
35Finished checking --- 1 code warning, as expected
This page took 0.390577 seconds and 5 git commands to generate.