]> andersk Git - splint.git/blame_incremental - test/preds.expect
Making fixes for Microsoft Visual C++ compiler.
[splint.git] / test / preds.expect
... / ...
CommitLineData
1
2preds.c: (in function f)
3preds.c:10:7: Test expression for if not bool, type int: *p
4 Test expression type is not boolean or int. (Use -predboolint to inhibit
5 warning)
6preds.c:15:8: Operand of ! is non-boolean (int): !(*p)
7 The operand of a boolean operator is not a boolean. Use +ptrnegate to allow !
8 to be used on pointers. (Use -boolops to inhibit warning)
9preds.c:20:7: Test expression for if is assignment expression: b1 = b2
10 The condition test is an assignment expression. Probably, you mean to use ==
11 instead of =. If an assignment is intended, add an extra parentheses nesting
12 (e.g., if ((a = b)) ...) to suppress this message. (Use -predassign to
13 inhibit warning)
14preds.c:25:7: Test expression for if not bool, type char: (c = 'a')
15 Test expression type is not boolean. (Use -predboolothers to inhibit warning)
16preds.c:30:7: Use of == with bool variables (risks inconsistency because of
17 multiple true values): b1 == b2
18 Two bool values are compared directly using a C primitive. This may produce
19 unexpected results since all non-zero values are considered true, so
20 different true values may not be equal. The file bool.h (included in
21 splint/lib) provides bool_equal for safe bool comparisons. (Use -boolcompare
22 to inhibit warning)
23preds.c:35:7: Test expression for if not bool, type char: c
24
25Finished checking --- 6 code warnings, as expected
26
27preds.c: (in function f)
28preds.c:20:7: Test expression for if is assignment expression: b1 = b2
29 The condition test is an assignment expression. Probably, you mean to use ==
30 instead of =. If an assignment is intended, add an extra parentheses nesting
31 (e.g., if ((a = b)) ...) to suppress this message. (Use -predassign to
32 inhibit warning)
33
34Finished checking --- 1 code warning, as expected
35
36bool.h:11:25: Constant exported, but not specified: FALSE
37 A constant is exported, but not specified. (Use -exportconst to inhibit
38 warning)
39bool.h:16:25: Constant exported, but not specified: TRUE
40preds.c: (in function f)
41preds.c:5:8: Operand of ! is non-boolean (int *): !p
42 The operand of ! operator is a pointer. (Use +ptrnegate to inhibit warning)
43preds.c:10:7: Test expression for if not bool, type int: *p
44 Test expression type is not boolean or int. (Use -predboolint to inhibit
45 warning)
46preds.c:15:8: Operand of ! is non-boolean (int): !(*p)
47 The operand of a boolean operator is not a boolean. Use +ptrnegate to allow !
48 to be used on pointers. (Use -boolops to inhibit warning)
49preds.c:20:7: Test expression for if is assignment expression: b1 = b2
50 The condition test is an assignment expression. Probably, you mean to use ==
51 instead of =. If an assignment is intended, add an extra parentheses nesting
52 (e.g., if ((a = b)) ...) to suppress this message. (Use -predassign to
53 inhibit warning)
54preds.c:25:7: Test expression for if not bool, type char: (c = 'a')
55 Test expression type is not boolean. (Use -predboolothers to inhibit warning)
56preds.c:30:7: Use of == with bool variables (risks inconsistency because of
57 multiple true values): b1 == b2
58 Two bool values are compared directly using a C primitive. This may produce
59 unexpected results since all non-zero values are considered true, so
60 different true values may not be equal. The file bool.h (included in
61 splint/lib) provides bool_equal for safe bool comparisons. (Use -boolcompare
62 to inhibit warning)
63preds.c:35:7: Test expression for if not bool, type char: c
64preds.c:3:5: Function f declared but not used
65 A function is declared but not used. Use /*@unused@*/ in front of function
66 header to suppress message. (Use -fcnuse to inhibit warning)
67 preds.c:41:1: Definition of f
68
69Finished checking --- 10 code warnings, as expected
This page took 0.036222 seconds and 5 git commands to generate.