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