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:
11 libs.c:30:3: Format string parameter to printf is not a compile-time constant:
13 libs.c:31:3: Format string parameter to fprintf is not a compile-time constant:
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:
34 libs.c:55:3: Return value (type [function (int) returns void]) ignored:
37 Finished checking --- 18 code warnings, as expected
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:
48 libs.c:30:3: Format string parameter to printf is not a compile-time constant:
50 libs.c:31:3: Format string parameter to fprintf is not a compile-time constant:
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:
75 libs.c:55:3: Return value (type [function (int) returns void]) ignored:
78 Finished checking --- 22 code warnings, as expected
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:
89 libs.c:29:3: Undocumented modification of *f possible from call to fprintf:
91 libs.c:30:3: Format string parameter to printf is not a compile-time constant:
93 libs.c:31:3: Format string parameter to fprintf is not a compile-time constant:
95 libs.c:33:7: Undocumented modification of *f possible from call to fgetc:
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:
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:
122 libs.c:55:3: Return value (type [function (int) returns void]) ignored:
125 Finished checking --- 25 code warnings, as expected
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:
136 libs.c:29:3: Undocumented modification of *f possible from call to fprintf:
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:
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:
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:
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:
154 libs.c:33:7: Undocumented modification of errno possible from call to fgetc:
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:
160 libs.c:34:7: Undocumented modification of errno possible from call to getc:
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:
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:
199 Finished checking --- 44 code warnings, as expected