File: argorder.expect

package info (click to toggle)
splint 3.1.2.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 12,908 kB
  • ctags: 15,816
  • sloc: ansic: 150,306; yacc: 3,463; sh: 3,426; makefile: 2,217; lex: 412
file content (86 lines) | stat: -rw-r--r-- 4,608 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

argorder.c: (in function f)
argorder.c:8:20: Argument 2 modifies z, used by argument 3 (order of evaluation
                    of actual parameters is undefined): printf("%d %d", z++, z)
argorder.c:10:13: Argument 1 modifies i, used by argument 2 (order of
    evaluation of actual parameters is undefined): f((i++, j++), (i = 3), j)
argorder.c:10:13: Argument 1 modifies j, used by argument 3 (order of
    evaluation of actual parameters is undefined): f((i++, j++), (i = 3), j)
argorder.c:10:25: Argument 2 modifies i, used by argument 1 (order of
    evaluation of actual parameters is undefined): f((i++, j++), (i = 3), j)

Finished checking --- 4 code warnings, as expected

argorder2.c: (in function g)
argorder2.c:16:12: Argument 1 modifies i, used by argument 2 (order of
    evaluation of actual parameters is undefined): f(f(1, 2), f(1, 2))
argorder2.c:16:21: Argument 2 modifies i, used by argument 1 (order of
    evaluation of actual parameters is undefined): f(f(1, 2), f(1, 2))
argorder2.c:17:12: Argument 1 modifies i, used by argument 2 (order of
    evaluation of actual parameters is undefined): f(f(1, 2), h())
argorder2.c:18:12: Argument 1 modifies i, used by argument 2 (order of
    evaluation of actual parameters is undefined): f(f(1, 2), i)
argorder2.c:19:14: Argument 1 modifies i, used by argument 2 (order of
                      evaluation of actual parameters is undefined): f(i++, i)

Finished checking --- 5 code warnings, as expected

argorder3.c: (in function f)
argorder3.c:7:8: Expression has undefined behavior (value of left operand i is
                    modified by right operand i++): i = i++
argorder3.c:8:11: Expression has undefined behavior (left operand uses i,
                     modified by right operand): a[i] = i++
argorder3.c:9:12: Expression has undefined behavior (value of right operand
                     modified by left operand): a[i++] = i
argorder3.c:10:13: Expression has undefined behavior (value of right operand
                      modified by left operand): i++ * i
argorder3.c:11:12: Expression has undefined behavior (value of left operand i
                      is modified by right operand i++): i * i++
argorder3.c:12:14: Expression has undefined behavior (left operand uses i,
                      modified by right operand): --i * ++i
argorder3.c:12:14: Expression has undefined behavior (left operand modifies i,
                      used by right operand): --i * ++i
argorder3.c:13:2: Path with no return in function declared to return int

Finished checking --- 8 code warnings, as expected

argorder4.c: (in function h)
argorder4.c:19:21: Expression has undefined behavior (left operand uses glob,
                      modified by right operand): f() + g()
argorder4.c:25:18: Expression has undefined behavior (left operand uses glob,
                      modified by right operand): f() + (++glob)
argorder4.c:29:18: Expression has undefined behavior (left operand uses glob,
                      modified by right operand): g() + h()
argorder4.c:29:18: Expression has undefined behavior (left operand modifies
                      glob, used by right operand): g() + h()
argorder4.c:35:16: Argument 1 modifies file system state, used by argument 2
    (order of evaluation of actual parameters is undefined):
    add((printf("hullo"), 3), (printf("goodbye"), 4))
argorder4.c:35:16: Argument 1 modifies *stdout, set by argument 2 (order of
    evaluation of actual parameters is undefined):
    add((printf("hullo"), 3), (printf("goodbye"), 4))
argorder4.c:35:38: Argument 2 modifies file system state, used by argument 1
    (order of evaluation of actual parameters is undefined):
    add((printf("hullo"), 3), (printf("goodbye"), 4))
argorder4.c:35:38: Argument 2 modifies *stdout, set by argument 1 (order of
    evaluation of actual parameters is undefined):
    add((printf("hullo"), 3), (printf("goodbye"), 4))
argorder4.c:35:10: Unreachable code: return (add((pri...

Finished checking --- 9 code warnings, as expected

argorder4.c: (in function h)
argorder4.c:35:10: Unreachable code: return (add((pri...

Finished checking --- 1 code warning, as expected

argorder5.c: (in function f)
argorder5.c:8:9: Variable name used after being released
   argorder5.c:8:17: Storage name released
argorder5.c:9:19: Variable name used after being released
   argorder5.c:9:12: Storage name released
argorder5.c:10:28: Argument 2 modifies *name, used by argument 1 (order of
    evaluation of actual parameters is undefined):
    test2(copystring(name), f(name))

Finished checking --- 3 code warnings, as expected