]> andersk Git - splint.git/blame - test/sharing.expect
Created repository.
[splint.git] / test / sharing.expect
CommitLineData
885824d3 1
2sharing1.c: (in function f)
3sharing1.c:12:12: Only storage x not released before return
4 sharing1.c:8:24: Storage x becomes only
5sharing1.c:13:2: Only storage x not released before return
6 sharing1.c:8:24: Storage x becomes only
7sharing1.c: (in function f2)
8sharing1.c:19:12: Only storage y not released before return
9 sharing1.c:15:43: Storage y becomes only
10sharing1.c: (in function f3)
11sharing1.c:24:3: Only storage x assigned to shared: globshared1 = x
12 sharing1.c:22:25: Storage x becomes only
13sharing1.c:25:2: Only storage x not released before return
14 sharing1.c:22:25: Storage x becomes only
15sharing1.c: (in function f4)
16sharing1.c:29:3: Only storage zonly not released before assignment: zonly = x
17 sharing1.c:6:19: Storage zonly becomes only
18sharing1.c: (in function g)
19sharing1.c:41:7: Implicitly temp storage imp passed as only param: f3 (imp)
20sharing1.c:42:4: Variable imp used after being released
21 sharing1.c:41:7: Storage imp released
22sharing1.c:44:12: Immediate address &x passed as only param: f (&x, ...)
23sharing1.c:44:12: Parameter 1 (&x) to function f is declared only but is
24 aliased by parameter 2 (&x)
25sharing1.c:48:14: Possibly null storage y3 passed as non-null param:
26 f2 (y3, ...)
27 sharing1.c:37:13: Storage y3 may become null
28sharing1.c:48:14: Passed storage y3 not completely defined (*y3 is undefined):
29 f2 (y3, ...)
30sharing1.c:48:18: Parameter 2 (y3) to function f2 is declared only but is
31 aliased by parameter 1 (y3)
32sharing1.c:50:4: Variable y3 used after being released
33 sharing1.c:48:18: Storage y3 released
34sharing1.c:51:12: Possibly null storage y passed as non-null param: f (y, ...)
35 sharing1.c:35:12: Storage y may become null
36sharing1.c:51:12: Passed storage y not completely defined (*y is undefined):
37 f (y, ...)
38sharing1.c:52:12: Shared storage globshared1 passed as only param:
39 f (globshared1, ...)
40 sharing1.c:4:19: Storage globshared1 becomes shared
41sharing1.c:56:9: Shared storage globshared2 passed as only param:
42 free (globshared2)
43 sharing1.c:5:19: Storage globshared2 becomes shared
44sharing1.c:59:11: Variable y used after being released
45 sharing1.c:51:12: Storage y released
46sharing1.c:59:13: Fresh storage y2 not released before return
47 sharing1.c:36:33: Fresh storage y2 allocated
48sharing1.c:59:13: Function returns with global globonly referencing released
49 storage
50 sharing1.c:57:9: Storage globonly is released
51
52Finished LCLint checking --- 21 code errors found, as expected
53
54sharing3.c: (in function string_copy)
55sharing3.c:17:10: Implicitly temp storage s returned as only: s
56sharing3.c: (in function string_free1)
57sharing3.c:32:9: Implicitly temp storage s passed as only param: free (s)
58sharing3.c: (in function string_free3)
59sharing3.c:45:2: Fresh storage t not released before return
60 sharing3.c:42:29: Fresh storage t allocated
61
62Finished LCLint checking --- 3 code errors found, as expected
63
64sharing4.c: (in function f)
65sharing4.c:18:3: Only storage globonly1 not released before assignment:
66 globonly1 = only1
67 sharing4.c:1:20: Storage globonly1 becomes only
68sharing4.c:23:3: Only storage globonly4 not released before assignment:
69 globonly4 = shared1
70 sharing4.c:4:20: Storage globonly4 becomes only
71sharing4.c:23:3: Shared storage shared1 assigned to only: globonly4 = shared1
72 sharing4.c:14:26: Storage shared1 becomes shared
73sharing4.c:27:3: Only storage globonly5 assigned to shared:
74 globshared1 = globonly5
75 sharing4.c:5:20: Storage globonly5 becomes only
76sharing4.c:30:3: Only storage globonly1 assigned to shared (local1 aliases
77 globonly1): globshared1 = local1
78 sharing4.c:1:20: Storage globonly1 becomes only
79sharing4.c:30:3: Kept storage only1 assigned to shared (local1 aliases only1):
80 globshared1 = local1
81 sharing4.c:18:3: Storage only1 becomes kept
82sharing4.c:32:3: Only storage assigned to shared:
83 globshared1 = string_copy(local1)
84sharing4.c:34:3: Temp storage temp2 assigned to shared: globshared2 = temp2
85 sharing4.c:13:37: Storage temp2 becomes temp
86sharing4.c:35:3: Only storage globonly4 not released before assignment:
87 globonly4 = temp1
88 sharing4.c:4:20: Storage globonly4 becomes only
89sharing4.c:35:3: Implicitly temp storage temp1 assigned to only:
90 globonly4 = temp1
91sharing4.c:38:9: Shared storage shared1 passed as only param: free (shared1)
92 sharing4.c:14:26: Storage shared1 becomes shared
93sharing4.c:42:12: Only storage only3 not released before return
94 sharing4.c:12:72: Storage only3 becomes only
95sharing4.c:42:12: Function returns with global globonly3 referencing released
96 storage
97 sharing4.c:21:9: Storage globonly3 is released
98
99Finished LCLint checking --- 13 code errors found, as expected
100
101sharing4.c: (in function f)
102sharing4.c:18:3: Only storage globonly1 not released before assignment:
103 globonly1 = only1
104 sharing4.c:1:20: Storage globonly1 becomes only
105sharing4.c:23:3: Only storage globonly4 not released before assignment:
106 globonly4 = shared1
107 sharing4.c:4:20: Storage globonly4 becomes only
108sharing4.c:23:3: Shared storage shared1 assigned to only: globonly4 = shared1
109 sharing4.c:14:26: Storage shared1 becomes shared
110sharing4.c:27:3: Only storage globonly5 assigned to shared:
111 globshared1 = globonly5
112 sharing4.c:5:20: Storage globonly5 becomes only
113sharing4.c:30:3: Only storage globonly1 assigned to shared (local1 aliases
114 globonly1): globshared1 = local1
115 sharing4.c:1:20: Storage globonly1 becomes only
116sharing4.c:30:3: Kept storage only1 assigned to shared (local1 aliases only1):
117 globshared1 = local1
118 sharing4.c:18:3: Storage only1 becomes kept
119sharing4.c:32:3: Only storage assigned to shared:
120 globshared1 = string_copy(local1)
121sharing4.c:34:3: Temp storage temp2 assigned to shared: globshared2 = temp2
122 sharing4.c:13:37: Storage temp2 becomes temp
123sharing4.c:35:3: Only storage globonly4 not released before assignment:
124 globonly4 = temp1
125 sharing4.c:4:20: Storage globonly4 becomes only
126sharing4.c:38:9: Shared storage shared1 passed as only param: free (shared1)
127 sharing4.c:14:26: Storage shared1 becomes shared
128sharing4.c:42:12: Only storage only3 not released before return
129 sharing4.c:12:72: Storage only3 becomes only
130sharing4.c:42:12: Function returns with global globonly3 referencing released
131 storage
132 sharing4.c:21:9: Storage globonly3 is released
133
134Finished LCLint checking --- 12 code errors found, as expected
135
136sharing5.c: (in function f)
137sharing5.c:13:4: Variable only1 used after being released
138 sharing5.c:12:9: Storage only1 released
139sharing5.c:22:5: Clauses exit with local2 referencing local storage in true
140 branch, shared storage in false branch
141 sharing5.c:21:7: Storage local2 becomes shared
142sharing5.c:24:9: Shared storage shared passed as only param (local2 aliases
143 shared): free (local2)
144 sharing5.c:5:27: Storage shared becomes shared
145sharing5.c:27:4: Dereference of possibly null pointer localp: *localp
146 sharing5.c:26:12: Storage localp may become null
147sharing5.c:32:3: Fresh storage localp not released before assignment:
148 localp = &only3
149 sharing5.c:26:3: Fresh storage localp allocated
150sharing5.c:33:2: Only storage only3 not released before return
151 sharing5.c:4:73: Storage only3 becomes only
152
153Finished LCLint checking --- 6 code errors found, as expected
This page took 0.130197 seconds and 5 git commands to generate.