]> andersk Git - splint.git/blob - test/libs.expect
- library fixes:
[splint.git] / test / libs.expect
1
2 libs.c: (in function compare2)
3 libs.c:14:10: Observer storage returned without qualification: "ok"
4    libs.c:14:10: Storage becomes observer
5 libs.c: (in function leave)
6 libs.c:20:9: Function exit expects arg 1 to be int gets char *: "hullo"
7 libs.c:21:3: Unreachable code: exit(i)
8 libs.c: (in function print)
9 libs.c:29:3: Format string parameter to fprintf is not a compile-time constant:
10                 s
11 libs.c:30:3: Format string parameter to printf is not a compile-time constant:
12                 s
13 libs.c:31:3: Format string parameter to fprintf is not a compile-time constant:
14                 s
15 libs.c:33:3: Assignment of int to char: c = fgetc(f)
16 libs.c:34:3: Assignment of int to char: c = getc(f)
17 libs.c: (in function main)
18 libs.c:46:44: Function bsearch expects arg 4 to be size_t gets [function (int,
19                  int) returns int]: compare
20 libs.c:46:10: Function bsearch called with 4 args, expects 5
21 libs.c:48:50: Function bsearch expects arg 5 to be [function (void *, void *)
22     returns int] * gets [function () returns char] *:
23     ([function () returns char] *)compare2
24 libs.c:48:3: Return value (type void *) ignored: bsearch(NULL, NU...
25 libs.c:52:10: Function qsort expects arg 1 to be void * gets unsigned int: x
26 libs.c:52:19: Function qsort expects arg 4 to be [function (void *, void *)
27     returns int] * gets [function () returns char] *:
28     ([function () returns char] *)compare2
29 libs.c:54:11: Unrecognized identifier: SIGHUP
30 libs.c:54:19: Function signal expects arg 2 to be [function (int) returns void]
31                  * gets [function (int, int) returns int]: compare
32 libs.c:54:3: Return value (type [function (int) returns void]) ignored:
33                 signal(SIGHUP, c...
34 libs.c:55:3: Return value (type [function (int) returns void]) ignored:
35                 signal(SIGHUP, l...
36
37 Finished checking --- 18 code warnings, as expected
38
39 libs.c: (in function compare2)
40 libs.c:14:10: Observer storage returned without qualification: "ok"
41    libs.c:14:10: Storage becomes observer
42 libs.c: (in function leave)
43 libs.c:20:9: Function exit expects arg 1 to be int gets char *: "hullo"
44 libs.c:21:3: Unreachable code: exit(i)
45 libs.c: (in function print)
46 libs.c:29:3: Format string parameter to fprintf is not a compile-time constant:
47                 s
48 libs.c:30:3: Format string parameter to printf is not a compile-time constant:
49                 s
50 libs.c:31:3: Format string parameter to fprintf is not a compile-time constant:
51                 s
52 libs.c:33:3: Assignment of int to char: c = fgetc(f)
53 libs.c:34:3: Assignment of int to char: c = getc(f)
54 libs.c: (in function main)
55 libs.c:46:44: Function bsearch expects arg 4 to be size_t gets [function (int,
56                  int) returns int]: compare
57 libs.c:46:10: Function bsearch called with 4 args, expects 5
58 libs.c:48:50: Function bsearch expects arg 5 to be [function (void *, void *)
59     returns int] * gets [function () returns char] *:
60     ([function () returns char] *)compare2
61 libs.c:48:3: Return value (type void *) ignored: bsearch(NULL, NU...
62 libs.c:51:16: Function qsort expects arg 2 to be size_t gets unsigned int: x
63 libs.c:51:19: Function qsort expects arg 3 to be size_t gets unsigned int: x
64 libs.c:52:10: Function qsort expects arg 1 to be void * gets unsigned int: x
65 libs.c:52:13: Function qsort expects arg 2 to be size_t gets unsigned int: x
66 libs.c:52:16: Function qsort expects arg 3 to be size_t gets unsigned int: x
67 libs.c:52:19: Function qsort expects arg 4 to be [function (void *, void *)
68     returns int] * gets [function () returns char] *:
69     ([function () returns char] *)compare2
70 libs.c:54:11: Unrecognized identifier: SIGHUP
71 libs.c:54:19: Function signal expects arg 2 to be [function (int) returns void]
72                  * gets [function (int, int) returns int]: compare
73 libs.c:54:3: Return value (type [function (int) returns void]) ignored:
74                 signal(SIGHUP, c...
75 libs.c:55:3: Return value (type [function (int) returns void]) ignored:
76                 signal(SIGHUP, l...
77
78 Finished checking --- 22 code warnings, as expected
79
80 libs.c: (in function compare2)
81 libs.c:14:10: Observer storage returned without qualification: "ok"
82    libs.c:14:10: Storage becomes observer
83 libs.c: (in function leave)
84 libs.c:20:9: Function exit expects arg 1 to be int gets char *: "hullo"
85 libs.c:21:3: Unreachable code: exit(i)
86 libs.c: (in function print)
87 libs.c:29:3: Format string parameter to fprintf is not a compile-time constant:
88                 s
89 libs.c:29:3: Undocumented modification of *f possible from call to fprintf:
90                 fprintf(f, s)
91 libs.c:30:3: Format string parameter to printf is not a compile-time constant:
92                 s
93 libs.c:31:3: Format string parameter to fprintf is not a compile-time constant:
94                 s
95 libs.c:33:7: Undocumented modification of *f possible from call to fgetc:
96                 fgetc(f)
97 libs.c:33:3: Assignment of int to char: c = fgetc(f)
98 libs.c:34:7: Undocumented modification of *f possible from call to getc:
99                 getc(f)
100 libs.c:34:3: Assignment of int to char: c = getc(f)
101 libs.c: (in function main)
102 libs.c:46:44: Function bsearch expects arg 4 to be size_t gets [function (int,
103                  int) returns int]: compare
104 libs.c:46:10: Function bsearch called with 4 args, expects 5
105 libs.c:48:50: Function bsearch expects arg 5 to be [function (void *, void *)
106     returns int] * gets [function () returns char] *:
107     ([function () returns char] *)compare2
108 libs.c:48:3: Return value (type void *) ignored: bsearch(NULL, NU...
109 libs.c:51:16: Function qsort expects arg 2 to be size_t gets unsigned int: x
110 libs.c:51:19: Function qsort expects arg 3 to be size_t gets unsigned int: x
111 libs.c:52:10: Function qsort expects arg 1 to be void * gets unsigned int: x
112 libs.c:52:13: Function qsort expects arg 2 to be size_t gets unsigned int: x
113 libs.c:52:16: Function qsort expects arg 3 to be size_t gets unsigned int: x
114 libs.c:52:19: Function qsort expects arg 4 to be [function (void *, void *)
115     returns int] * gets [function () returns char] *:
116     ([function () returns char] *)compare2
117 libs.c:54:11: Unrecognized identifier: SIGHUP
118 libs.c:54:19: Function signal expects arg 2 to be [function (int) returns void]
119                  * gets [function (int, int) returns int]: compare
120 libs.c:54:3: Return value (type [function (int) returns void]) ignored:
121                 signal(SIGHUP, c...
122 libs.c:55:3: Return value (type [function (int) returns void]) ignored:
123                 signal(SIGHUP, l...
124
125 Finished checking --- 25 code warnings, as expected
126
127 libs.c: (in function compare2)
128 libs.c:14:10: Observer storage returned without qualification: "ok"
129    libs.c:14:10: Storage becomes observer
130 libs.c: (in function leave)
131 libs.c:20:9: Function exit expects arg 1 to be int gets char *: "hullo"
132 libs.c:21:3: Unreachable code: exit(i)
133 libs.c: (in function print)
134 libs.c:29:3: Format string parameter to fprintf is not a compile-time constant:
135                 s
136 libs.c:29:3: Undocumented modification of *f possible from call to fprintf:
137                 fprintf(f, s)
138 libs.c:29:3: Return value (type int) ignored: fprintf(f, s)
139 libs.c:30:3: Format string parameter to printf is not a compile-time constant:
140                 s
141 libs.c:30:3: Called procedure printf may access global stdout
142 libs.c:30:3: Undocumented modification of *stdout possible from call to printf:
143                 printf(s)
144 libs.c:30:3: Return value (type int) ignored: printf(s)
145 libs.c:31:12: Undocumented use of global stderr
146 libs.c:31:3: Format string parameter to fprintf is not a compile-time constant:
147                 s
148 libs.c:31:3: Undocumented modification of *stderr possible from call to
149                 fprintf: fprintf(stderr, s)
150 libs.c:31:3: Return value (type int) ignored: fprintf(stderr, s)
151 libs.c:33:7: Called procedure fgetc may access global errno
152 libs.c:33:7: Undocumented modification of *f possible from call to fgetc:
153                 fgetc(f)
154 libs.c:33:7: Undocumented modification of errno possible from call to fgetc:
155                 fgetc(f)
156 libs.c:33:3: Assignment of int to char: c = fgetc(f)
157 libs.c:34:7: Called procedure getc may access global errno
158 libs.c:34:7: Undocumented modification of *f possible from call to getc:
159                 getc(f)
160 libs.c:34:7: Undocumented modification of errno possible from call to getc:
161                 getc(f)
162 libs.c:34:3: Assignment of int to char: c = getc(f)
163 libs.c: (in function main)
164 libs.c:46:44: Function bsearch expects arg 4 to be size_t gets [function (int,
165                  int) returns int]: compare
166 libs.c:46:10: Function bsearch called with 4 args, expects 5
167 libs.c:48:50: Function bsearch expects arg 5 to be [function (void *, void *)
168     returns int] * gets [function () returns char] *:
169     ([function () returns char] *)compare2
170 libs.c:48:3: Return value (type void *) ignored: bsearch(NULL, NU...
171 libs.c:51:16: Function qsort expects arg 2 to be size_t gets unsigned int: x
172 libs.c:51:19: Function qsort expects arg 3 to be size_t gets unsigned int: x
173 libs.c:51:3: Called procedure qsort may access global errno
174 libs.c:51:3: Undocumented modification of errno possible from call to qsort:
175                 qsort(NULL, x, x, ([function () returns int] *)compare)
176 libs.c:52:10: Function qsort expects arg 1 to be void * gets unsigned int: x
177 libs.c:52:13: Function qsort expects arg 2 to be size_t gets unsigned int: x
178 libs.c:52:16: Function qsort expects arg 3 to be size_t gets unsigned int: x
179 libs.c:52:19: Function qsort expects arg 4 to be [function (void *, void *)
180     returns int] * gets [function () returns char] *:
181     ([function () returns char] *)compare2
182 libs.c:52:3: Called procedure qsort may access global errno
183 libs.c:52:3: Undocumented modification of errno possible from call to qsort:
184                 qsort(x, x, x, ([function () returns char] *)compare2)
185 libs.c:54:11: Unrecognized identifier: SIGHUP
186 libs.c:54:19: Function signal expects arg 2 to be [function (int) returns void]
187                  * gets [function (int, int) returns int]: compare
188 libs.c:54:3: Called procedure signal may access global errno
189 libs.c:54:3: Undocumented modification of errno possible from call to signal:
190                 signal(SIGHUP, compare)
191 libs.c:54:3: Return value (type [function (int) returns void]) ignored:
192                 signal(SIGHUP, c...
193 libs.c:55:3: Called procedure signal may access global errno
194 libs.c:55:3: Undocumented modification of errno possible from call to signal:
195                 signal(SIGHUP, leave)
196 libs.c:55:3: Return value (type [function (int) returns void]) ignored:
197                 signal(SIGHUP, l...
198
199 Finished checking --- 44 code warnings, as expected
This page took 1.623337 seconds and 5 git commands to generate.