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