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