]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | |
3120b462 | 2 | < loading standard library /af10/evans/LCLintDev/lib/ansi.lcd .... > |
885824d3 | 3 | < reading spec bool.lcl > |
4 | < reading spec employee.lcl > | |
5 | < reading spec eref.lcl > | |
6 | < reading spec empset.lcl > | |
7 | < reading spec ereftab.lcl > | |
8 | < reading spec erc.lcl > | |
9 | < reading spec dbase.lcl > | |
10 | < preprocessing > | |
11 | < checking employee.c > | |
12 | employee.c: (in function employee_equal) | |
3120b462 | 13 | employee.c:25: Function strncmp expects arg 3 to be size_t gets int: |
885824d3 | 14 | maxEmployeeName |
15 | < checking eref.c > | |
16 | < checking empset.c > | |
17 | empset.c: (in function empset_insert) | |
18 | empset.c:28: Variable er declared but not used | |
19 | empset.c: (in function empset_disjointUnion) | |
20 | empset.c:85: Undocumented modification of s1 possible from call to | |
21 | erc_iterStart (through alias s2): erc_iterStart(s2) | |
22 | empset.c:85: Undocumented modification of s2 possible from call to | |
23 | erc_iterStart: erc_iterStart(s2) | |
24 | empset.c: (in function empset_union) | |
25 | empset.c:108: Undocumented modification of s2 possible from call to | |
26 | erc_iterStart (through alias s1): erc_iterStart(s1) | |
27 | empset.c:108: Undocumented modification of s1 possible from call to | |
28 | erc_iterStart: erc_iterStart(s1) | |
29 | empset.c: (in function empset_subset) | |
30 | empset.c:139: Undocumented modification of s1 possible from call to | |
31 | erc_iterStart: erc_iterStart(s1) | |
32 | empset.c:135: Variable e declared but not used | |
33 | < checking ereftab.c > | |
34 | ereftab.c: (in function ereftab_lookup) | |
35 | ereftab.c:34: Undocumented modification of t possible from call to | |
36 | erc_iterStart: erc_iterStart(t) | |
37 | < checking erc.c > | |
38 | erc.c: (in function erc_member) | |
39 | erc.c:47: Operands of == are abstract type (eref): tmpc->val == er | |
40 | erc.c: (in function erc_delete) | |
41 | erc.c:78: Operands of == are abstract type (eref): elem->val == er | |
42 | erc.c: (in function erc_sprint) | |
43 | erc.c:141: Function malloc expects arg 1 to be size_t gets int: | |
44 | erc_size(c) * (employeePrintSize + 1) + 1 | |
45 | erc.c:151: Undocumented modification of c possible from call to erc_iterStart: | |
46 | erc_iterStart(c) | |
47 | < checking dbase.c > | |
48 | dbase.c: (in function query) | |
49 | dbase.c:210: Variable er declared but not used | |
50 | dbase.c:211: Variable e declared but not used | |
51 | < checking drive.c > | |
52 | drive.c: (in function main) | |
53 | drive.c:123: Return value (type db_status) ignored: hire(e) | |
54 | < checking macros bool.h > | |
55 | < global checks > | |
56 | < cleaning .......... > | |
57 | ||
58 | Finished LCLint checking --- 16 code errors found, as expected | |
59 | ||
3120b462 | 60 | < loading standard library /af10/evans/LCLintDev/lib/ansi.lcd .... > |
885824d3 | 61 | < reading spec bool.lcl > |
62 | < reading spec employee.lcl > | |
63 | < reading spec eref.lcl > | |
64 | < reading spec empset.lcl > | |
65 | < reading spec ereftab.lcl > | |
66 | < reading spec erc.lcl > | |
67 | < reading spec dbase.lcl > | |
68 | < preprocessing > | |
69 | employee.h:2: Name EMPLOYEE_H is reserved for future ANSI library extensions. | |
70 | Macros beginning with E and a digit or uppercase letter may be added to | |
71 | <errno.h>. (See ANSI, Section 4.13.1) | |
72 | < more preprocessing . > | |
73 | eref.h:2: Name EREF_H is reserved for future ANSI library extensions. Macros | |
74 | beginning with E and a digit or uppercase letter may be added to <errno.h>. | |
75 | (See ANSI, Section 4.13.1) | |
76 | < more preprocessing . > | |
77 | empset.h:2: Name EMPSET_H is reserved for future ANSI library extensions. | |
78 | Macros beginning with E and a digit or uppercase letter may be added to | |
79 | <errno.h>. (See ANSI, Section 4.13.1) | |
80 | < more preprocessing . > | |
81 | erc.h:2: Name ERC_H is reserved for future ANSI library extensions. Macros | |
82 | beginning with E and a digit or uppercase letter may be added to <errno.h>. | |
83 | (See ANSI, Section 4.13.1) | |
84 | < more preprocessing . > | |
85 | ereftab.h:4: Name EREFTAB_H is reserved for future ANSI library extensions. | |
86 | Macros beginning with E and a digit or uppercase letter may be added to | |
87 | <errno.h>. (See ANSI, Section 4.13.1) | |
88 | < more preprocessing . > | |
89 | < checking employee.c > | |
90 | bool.h:20: Modifies list for bool_initMod uses global internal state, not | |
91 | included in globals list. | |
92 | bool.h:20: Declaration of bool_initMod | |
3120b462 | 93 | employee.h:12: Declaration parameter has name: p_e |
94 | employee.c:5: Definition parameter name e does not match name of corresponding | |
95 | parameter in declaration: p_e | |
96 | employee.h:12: Previous declaration of p_e | |
885824d3 | 97 | employee.c: (in function employee_setName) |
3120b462 | 98 | employee.c:12: Undefined storage e->name corresponds to storage listed in |
99 | defines clause | |
100 | employee.c:12: Body of if statement is not a block: return FALSE | |
101 | employee.c:15: Parameter 1 (e->name) to function strcpy is declared unique but | |
885824d3 | 102 | may be aliased externally by parameter 2 (na) |
103 | employee.c: (in function employee_equal) | |
3120b462 | 104 | employee.c:25: Function strncmp expects arg 3 to be size_t gets int: |
885824d3 | 105 | maxEmployeeName |
106 | employee.c: (in function employee_sprint) | |
3120b462 | 107 | employee.c:30: Read-only string literal storage used as initial value for |
885824d3 | 108 | unqualified storage: gender[0] = "male" |
3120b462 | 109 | employee.c:30: Read-only string literal storage used as initial value for |
885824d3 | 110 | unqualified storage: gender[1] = "female" |
885824d3 | 111 | employee.c:30: Read-only string literal storage used as initial value for |
3120b462 | 112 | unqualified storage: gender[2] = "?" |
113 | employee.c:31: Read-only string literal storage used as initial value for | |
885824d3 | 114 | unqualified storage: jobs[0] = "manager" |
3120b462 | 115 | employee.c:31: Read-only string literal storage used as initial value for |
885824d3 | 116 | unqualified storage: jobs[1] = "non-manager" |
3120b462 | 117 | employee.c:31: Read-only string literal storage used as initial value for |
885824d3 | 118 | unqualified storage: jobs[2] = "?" |
3120b462 | 119 | employee.c:34: Array fetch using non-integer, gender: gender[e.gen] |
120 | employee.c:34: Array fetch using non-integer, job: jobs[e.j] | |
885824d3 | 121 | employee.h: (in macro employee_initMod) |
3120b462 | 122 | employee.h:14: Called procedure bool_initMod may access internal state, but |
885824d3 | 123 | globals list does not include globals internalState |
3120b462 | 124 | employee.h:14: Undocumented modification of internal state possible from call |
885824d3 | 125 | to bool_initMod: bool_initMod() |
126 | < checking eref.c > | |
127 | eref.h:9: Constant exported, but not specified: used | |
128 | eref.h:9: Constant exported, but not specified: avail | |
129 | eref.h:9: Type exported, but not specified: eref_status | |
130 | eref.h:14: Type exported, but not specified: eref_ERP | |
131 | eref.h:17: Variable exported, but not specified: eref_Pool | |
132 | eref.c: (in function eref_alloc) | |
133 | eref.c:12: Undocumented use of global eref_Pool | |
134 | eref.c:12: Undocumented use of global eref_Pool | |
135 | eref.c:12: Body of for statement is empty | |
136 | eref.c:12: Undocumented use of global eref_Pool (in post loop test) | |
137 | eref.c:16: Undocumented use of global eref_Pool | |
138 | eref.c:18: Undocumented use of global eref_Pool | |
139 | eref.c:19: Undocumented use of global eref_Pool | |
140 | eref.c:20: Undocumented use of global eref_Pool | |
141 | eref.c:20: Parameter to sizeof is type employee: sizeof(employee) | |
142 | eref.c:19: Undocumented modification of *(eref_Pool.conts) possible from call | |
143 | to realloc: realloc(eref_Pool.conts, 2 * eref_Pool.size * sizeof(employee)) | |
144 | eref.c:18: Undocumented modification of eref_Pool.conts: | |
145 | eref_Pool.conts = (employee *)realloc(eref_Pool.conts, 2 * eref_Pool.size * | |
146 | sizeof(employee)) | |
147 | eref.c:22: Undocumented use of global eref_Pool | |
148 | eref.c:25: Argument to exit has implementation defined behavior: 1 | |
149 | eref.c:28: Undocumented use of global eref_Pool | |
150 | eref.c:29: Undocumented use of global eref_Pool | |
151 | eref.c:30: Undocumented use of global eref_Pool | |
152 | eref.c:30: Parameter to sizeof is type eref_status: sizeof(eref_status) | |
153 | eref.c:29: Undocumented modification of *(eref_Pool.status) possible from call | |
154 | to realloc: realloc(eref_Pool.status, 2 * eref_Pool.size * | |
155 | sizeof(eref_status)) | |
156 | eref.c:28: Undocumented modification of eref_Pool.status: | |
157 | eref_Pool.status = (eref_status *)realloc(eref_Pool.status, 2 * | |
158 | eref_Pool.size * sizeof(eref_status)) | |
159 | eref.c:32: Undocumented use of global eref_Pool | |
160 | eref.c:35: Argument to exit has implementation defined behavior: 1 | |
161 | eref.c:38: Undocumented use of global eref_Pool | |
162 | eref.c:38: Undocumented use of global eref_Pool | |
163 | eref.c:38: Undocumented modification of eref_Pool.size: | |
164 | eref_Pool.size = 2 * eref_Pool.size | |
165 | eref.c:40: Undocumented use of global eref_Pool | |
166 | eref.c:41: Undocumented use of global eref_Pool | |
167 | eref.c:41: Undocumented modification of eref_Pool.status[]: | |
168 | eref_Pool.status[i] = avail | |
169 | eref.c:41: Body of for statement is not a block: eref_Pool.status[i] = avail | |
170 | eref.c:41: Undocumented use of global eref_Pool (in post loop test) | |
171 | eref.c:44: Undocumented use of global eref_Pool | |
172 | eref.c:44: Undocumented modification of eref_Pool.status[]: | |
173 | eref_Pool.status[res] = used | |
174 | eref.c: (in function eref_initMod) | |
175 | eref.c:53: Undocumented use of file static needsInit | |
176 | eref.c:58: Undocumented use of file static needsInit | |
177 | eref.c:58: Undocumented modification of needsInit: needsInit = FALSE | |
178 | eref.c:60: Statement has no effect: employee_initMod() | |
179 | eref.c:62: Undocumented use of global eref_Pool | |
180 | eref.c:62: Parameter to sizeof is type employee: sizeof(employee) | |
181 | eref.c:62: Undocumented modification of eref_Pool.conts: | |
182 | eref_Pool.conts = (employee *)malloc(size * sizeof(employee)) | |
80ee600a | 183 | eref.c:62: Implicitly only storage eref_Pool.conts (type employee *) not |
184 | released before assignment: eref_Pool.conts = (employee *)malloc(size * | |
185 | sizeof(employee)) | |
885824d3 | 186 | eref.c:64: Undocumented use of global eref_Pool |
187 | eref.c:67: Argument to exit has implementation defined behavior: 1 | |
188 | eref.c:70: Undocumented use of global eref_Pool | |
189 | eref.c:70: Parameter to sizeof is type eref_status: sizeof(eref_status) | |
190 | eref.c:70: Undocumented modification of eref_Pool.status: | |
191 | eref_Pool.status = (eref_status *)malloc(size * sizeof(eref_status)) | |
80ee600a | 192 | eref.c:70: Implicitly only storage eref_Pool.status (type eref_status *) not |
193 | released before assignment: eref_Pool.status = (eref_status *)malloc(size * | |
885824d3 | 194 | sizeof(eref_status)) |
195 | eref.c:72: Undocumented use of global eref_Pool | |
196 | eref.c:75: Argument to exit has implementation defined behavior: 1 | |
197 | eref.c:78: Undocumented use of global eref_Pool | |
198 | eref.c:78: Undocumented modification of eref_Pool.size: eref_Pool.size = size | |
199 | eref.c:82: Undocumented use of global eref_Pool | |
200 | eref.c:82: Undocumented modification of eref_Pool.status[]: | |
201 | eref_Pool.status[i] = avail | |
3120b462 | 202 | eref.c:84: Global storage *(eref_Pool.conts) contains 5 undefined fields when |
203 | call returns: ssNum, name, salary, gen, j | |
885824d3 | 204 | eref.c:84: Global storage eref_Pool contains 1 undefined field when call |
205 | returns: status | |
206 | eref.h: (in macro eref_free) | |
207 | eref.h:23: Undocumented use of global eref_Pool | |
208 | eref.h:23: Undocumented modification of eref_Pool.status[]: | |
209 | eref_Pool.status[er] = avail | |
210 | eref.h: (in macro eref_assign) | |
211 | eref.h:24: Undocumented use of global eref_Pool | |
212 | eref.h:24: Macro parameter used without parentheses: e | |
213 | eref.h:24: Undocumented modification of eref_Pool.conts[]: | |
214 | eref_Pool.conts[er] = e | |
215 | eref.h: (in macro eref_get) | |
216 | eref.h:25: Undocumented use of global eref_Pool | |
217 | eref.h: (in macro eref_equal) | |
218 | eref.h:26: Macro parameter used without parentheses: er1 | |
219 | eref.h:26: Macro parameter used without parentheses: er2 | |
220 | < checking empset.c > | |
80ee600a | 221 | erc.h:6: Name _elem is in the implementation name space (any identifier |
222 | beginning with underscore) | |
885824d3 | 223 | erc.h:6: Type exported, but not specified: ercElem |
224 | erc.h:7: Type exported, but not specified: ercList | |
225 | erc.h:8: Type exported, but not specified: ercInfo | |
226 | empset.h:10: Variable exported, but not specified: known | |
227 | empset.c:5: Name _empset_get is in the implementation name space (any | |
228 | identifier beginning with underscore) | |
229 | empset.c: (in function _empset_get) | |
230 | empset.c:11: Undocumented modification of s possible from call to | |
231 | erc_iterStart: erc_iterStart(s) | |
232 | empset.c:15: Body of if statement is not a block: | |
cc78dedd | 233 | do { { erc_iterFinal(it) } } while (FALSE) |
885824d3 | 234 | empset.c: (in function empset_insert) |
235 | empset.c:30: Undetected modification possible from call to unconstrained | |
236 | function _empset_get: _empset_get | |
237 | empset.c:28: Variable er declared but not used | |
238 | empset.c: (in function empset_insertUnique) | |
239 | empset.c:43: Undocumented use of global known | |
240 | empset.c:49: Undocumented use of global known | |
241 | empset.c:49: Undocumented modification of known possible from call to | |
242 | ereftab_insert: ereftab_insert(known, e, er) | |
243 | empset.c: (in function empset_delete) | |
244 | empset.c:59: Undetected modification possible from call to unconstrained | |
245 | function _empset_get: _empset_get | |
246 | empset.c: (in function empset_disjointUnion) | |
247 | empset.c:85: Undocumented modification of s1 possible from call to | |
248 | erc_iterStart (through alias s2): erc_iterStart(s2) | |
249 | empset.c:85: Undocumented modification of s2 possible from call to | |
250 | erc_iterStart: erc_iterStart(s2) | |
251 | empset.c:86: Body of for statement is not a block: | |
252 | empset_insertUnique(result, eref_get(er)) | |
253 | empset.c: (in function empset_union) | |
254 | empset.c:108: Undocumented modification of s2 possible from call to | |
255 | erc_iterStart (through alias s1): erc_iterStart(s1) | |
256 | empset.c:108: Undocumented modification of s1 possible from call to | |
257 | erc_iterStart: erc_iterStart(s1) | |
258 | empset.c:110: Body of if statement is not a block: erc_insert(result, er) | |
259 | empset.c:109: Body of for statement is not a block: | |
260 | if (!empset_member(eref_get(er), s2)) erc_insert(result, er) | |
261 | empset.c: (in function empset_intersect) | |
262 | empset.c:125: Body of if statement is not a block: erc_insert(toDelete, er) | |
263 | empset.c:124: Body of for statement is not a block: | |
264 | if (!empset_member(eref_get(er), s2)) erc_insert(toDelete, er) | |
265 | empset.c:128: Return value (type bool) ignored: erc_delete(s1, er) | |
266 | empset.c:128: Body of for statement is not a block: erc_delete(s1, er) | |
267 | empset.c: (in function empset_subset) | |
268 | empset.c:139: Undocumented modification of s1 possible from call to | |
269 | erc_iterStart: erc_iterStart(s1) | |
270 | empset.c:141: Body of if statement is not a block: | |
cc78dedd | 271 | do { { erc_iterFinal(it) } } while (FALSE) |
885824d3 | 272 | empset.c:140: Body of for statement is not a block: |
cc78dedd | 273 | if (!empset_member(eref_get(er), s2)) do { { erc_iterFinal(it) |
274 | } } while (FALSE) | |
885824d3 | 275 | empset.c:135: Variable e declared but not used |
276 | empset.c: (in function empset_initMod) | |
277 | empset.c:148: Undocumented use of file static initDone | |
278 | empset.c:148: Body of if statement is not a block: return | |
279 | empset.c:151: Statement has no effect: employee_initMod() | |
280 | empset.c:153: Statement has no effect: erc_initMod() | |
281 | empset.c:154: Statement has no effect: ereftab_initMod() | |
282 | empset.c:155: Undocumented use of global known | |
283 | empset.c:155: Undocumented modification of known: known = ereftab_create() | |
284 | empset.c:156: Undocumented use of file static initDone | |
285 | empset.c:156: Undocumented modification of initDone: initDone = TRUE | |
286 | empset.h: (in macro empset_member) | |
287 | empset.h:30: Undetected modification possible from call to unconstrained | |
288 | function _empset_get: _empset_get | |
289 | < checking ereftab.c > | |
290 | ereftab.c: (in function ereftab_delete) | |
291 | ereftab.c:24: Return value (type bool) ignored: erc_delete(t, er) | |
292 | ereftab.c: (in function ereftab_lookup) | |
293 | ereftab.c:34: Undocumented modification of t possible from call to | |
294 | erc_iterStart: erc_iterStart(t) | |
295 | ereftab.c:37: Body of if statement is not a block: return er | |
296 | ereftab.c: (in function ereftab_initMod) | |
297 | ereftab.c:47: Statement has no effect: erc_initMod() | |
298 | < checking erc.c > | |
299 | erc.c: (in function erc_create) | |
300 | erc.c:8: Parameter to sizeof is type ercInfo: sizeof(ercInfo) | |
301 | erc.c:13: Argument to exit has implementation defined behavior: 1 | |
302 | erc.c:18: Null storage c->vals derivable from return value: c | |
303 | erc.c:16: Storage c->vals becomes null | |
304 | erc.c:18: Fresh storage returned as unqualified (should be only): c | |
305 | erc.c:8: Fresh storage c allocated | |
306 | erc.c: (in function erc_clear) | |
307 | erc.c:34: Function returns with null storage derivable from parameter c->vals | |
308 | erc.c:32: Storage c->vals becomes null | |
309 | erc.c: (in function erc_final) | |
310 | erc.c:39: Implicitly temp storage c passed as only param: free (c) | |
311 | erc.c: (in function erc_member) | |
312 | erc.c:47: Operands of == are abstract type (eref): tmpc->val == er | |
313 | erc.c:47: Body of if statement is not a block: return TRUE | |
314 | erc.c:47: Body of for statement is not a block: | |
315 | if (tmpc->val == er) return TRUE | |
316 | erc.c: (in function erc_insert) | |
317 | erc.c:55: Parameter to sizeof is type ercElem: sizeof(ercElem) | |
318 | erc.c:60: Argument to exit has implementation defined behavior: 1 | |
319 | erc.c: (in function erc_delete) | |
320 | erc.c:78: Operands of == are abstract type (eref): elem->val == er | |
80ee600a | 321 | erc.c:83: Implicitly only storage prev->next (type struct _elem *) not released |
322 | before assignment: prev->next = elem->next | |
323 | erc.c:84: Clauses exit with elem referencing implicitly only storage in true | |
885824d3 | 324 | branch, local storage in false branch |
325 | erc.c:81: Storage elem becomes implicitly only | |
885824d3 | 326 | erc.c:87: Released storage c->vals reachable from parameter at return point |
327 | erc.c:85: Storage c->vals is released | |
328 | erc.c: (in function erc_iterStart) | |
329 | erc.c:98: Parameter to sizeof is type ercList: sizeof(ercList) | |
330 | erc.c:103: Argument to exit has implementation defined behavior: 1 | |
331 | erc.c:107: Fresh storage returned as unqualified (should be only): result | |
332 | erc.c:98: Fresh storage result allocated | |
333 | erc.c:108: Suspect object listed in modifies of erc_iterStart not modified: c | |
334 | erc.lcl:49: Specification of erc_iterStart | |
335 | erc.c: (in function erc_yield) | |
336 | erc.c:117: Implicitly temp storage it passed as only param: free (it) | |
337 | erc.c:117: Unreachable code: free(it) | |
338 | erc.c:118: Variable it is released in true branch, but live in continuation. | |
339 | erc.c:117: Storage it is released | |
340 | erc.c:121: Only storage *it->next assigned to unqualified: *(it) = (*it)->next | |
341 | erc.c: (in function erc_join) | |
342 | erc.c:130: Body of for statement is not a block: erc_insert(c1, tmpc->val) | |
343 | erc.c: (in function erc_sprint) | |
344 | erc.c:141: Function malloc expects arg 1 to be size_t gets int: | |
345 | erc_size(c) * (employeePrintSize + 1) + 1 | |
346 | erc.c:146: Argument to exit has implementation defined behavior: 1 | |
347 | erc.c:151: Undocumented modification of c possible from call to erc_iterStart: | |
348 | erc_iterStart(c) | |
349 | erc.c:159: Fresh storage returned as unqualified (should be only): result | |
350 | erc.c:140: Fresh storage result allocated | |
351 | erc.h: (in macro erc_choose) | |
352 | erc.h:15: Macro parameter used without parentheses: c | |
353 | erc.h: (in macro erc_initMod) | |
354 | erc.h:16: Called procedure bool_initMod may access internal state, but globals | |
355 | list does not include globals internalState | |
356 | erc.h:16: Undocumented modification of internal state possible from call to | |
357 | bool_initMod: bool_initMod() | |
358 | erc.h:16: Statement has no effect: employee_initMod() | |
359 | erc.h: (in macro erc_iterFinal) | |
80ee600a | 360 | erc.h:20: Only storage *it->next (type struct _elem *) derived from released |
361 | storage is not released (memory leak): it | |
885824d3 | 362 | erc.h:20: Implicitly temp storage it passed as only param: free (it) |
363 | < checking dbase.c > | |
364 | dbase.c: (in function db_initMod) | |
365 | dbase.c:21: Undocumented use of global initDone | |
366 | dbase.c:27: Statement has no effect: employee_initMod() | |
367 | dbase.c:29: Statement has no effect: erc_initMod() | |
368 | dbase.c:30: Statement has no effect: empset_initMod() | |
369 | dbase.c:32: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS | |
370 | dbase.c:32: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS, | |
371 | mNON, fNON }): i <= fNON | |
372 | dbase.c:34: Undocumented use of global db | |
373 | dbase.c:34: Undocumented modification of db[]: db[i] = erc_create() | |
374 | dbase.c:32: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON }) | |
375 | (in post loop test): i <= fNON | |
376 | dbase.c:37: Undocumented use of global initDone | |
377 | dbase.c:37: Undocumented modification of initDone: initDone = TRUE | |
378 | dbase.c:40: Name _db_ercKeyGet is in the implementation name space (any | |
379 | identifier beginning with underscore) | |
380 | dbase.c: (in function _db_ercKeyGet) | |
381 | dbase.c:45: Undocumented modification of c possible from call to erc_iterStart: | |
382 | erc_iterStart(c) | |
383 | dbase.c:56: Name _db_keyGet is in the implementation name space (any identifier | |
384 | beginning with underscore) | |
385 | dbase.c: (in function _db_keyGet) | |
386 | dbase.c:61: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS | |
387 | dbase.c:61: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS, | |
388 | mNON, fNON }): i <= fNON | |
389 | dbase.c:63: Undocumented use of global db | |
390 | dbase.c:63: Undetected modification possible from call to unconstrained | |
391 | function _db_ercKeyGet: _db_ercKeyGet | |
392 | dbase.c:61: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON }) | |
393 | (in post loop test): i <= fNON | |
394 | dbase.c:73: Name _db_addEmpls is in the implementation name space (any | |
395 | identifier beginning with underscore) | |
396 | dbase.c: (in function _db_addEmpls) | |
397 | dbase.c:81: Undocumented modification of c possible from call to erc_iterStart: | |
398 | erc_iterStart(c) | |
399 | dbase.c:86: Undocumented modification of s possible from call to empset_insert: | |
400 | empset_insert(s, e) | |
401 | dbase.c:86: Return value (type bool) ignored: empset_insert(s, e) | |
402 | dbase.c: (in function hire) | |
403 | dbase.c:97: Body of if statement is not a block: return genderERR | |
404 | dbase.c:100: Body of if statement is not a block: return jobERR | |
405 | dbase.c:103: Body of if statement is not a block: return salERR | |
406 | dbase.c:105: Undetected modification possible from call to unconstrained | |
407 | function _db_keyGet: _db_keyGet | |
408 | dbase.c:106: Body of if statement is not a block: return duplERR | |
409 | dbase.c: (in function uncheckedHire) | |
410 | dbase.c:121: Undocumented use of global db | |
411 | dbase.c:121: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
412 | db[mMGRS] | |
413 | dbase.c:121: Undocumented modification of db[] possible from call to | |
414 | erc_insert: erc_insert(db[mMGRS], er) | |
415 | dbase.c:123: Undocumented use of global db | |
416 | dbase.c:123: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
417 | db[mNON] | |
418 | dbase.c:123: Undocumented modification of db[] possible from call to | |
419 | erc_insert: erc_insert(db[mNON], er) | |
420 | dbase.c:121: Body of if clause of if statement is not a block: | |
421 | erc_insert(db[mMGRS], er) | |
422 | dbase.c:123: Body of else clause of if statement is not a block: | |
423 | erc_insert(db[mNON], er) | |
424 | dbase.c:126: Undocumented use of global db | |
425 | dbase.c:126: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
426 | db[fMGRS] | |
427 | dbase.c:126: Undocumented modification of db[] possible from call to | |
428 | erc_insert: erc_insert(db[fMGRS], er) | |
429 | dbase.c:128: Undocumented use of global db | |
430 | dbase.c:128: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
431 | db[fNON] | |
432 | dbase.c:128: Undocumented modification of db[] possible from call to | |
433 | erc_insert: erc_insert(db[fNON], er) | |
434 | dbase.c:126: Body of if clause of if statement is not a block: | |
435 | erc_insert(db[fMGRS], er) | |
436 | dbase.c:128: Body of else clause of if statement is not a block: | |
437 | erc_insert(db[fNON], er) | |
438 | dbase.c:123: Body of if clause of if statement is not a block: | |
439 | if (e.j == MGR) erc_insert(db[mMGRS], er) else erc_insert(db[mNON], er) | |
440 | dbase.c: (in function fire) | |
441 | dbase.c:137: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS | |
442 | dbase.c:137: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS, | |
443 | mNON, fNON }): i <= fNON | |
444 | dbase.c:138: Undocumented use of global db | |
445 | dbase.c:138: Undocumented modification of db[] possible from call to | |
446 | erc_iterStart: erc_iterStart(db[i]) | |
447 | dbase.c:142: Undocumented use of global db | |
448 | dbase.c:142: Undocumented modification of db[] possible from call to | |
449 | erc_delete: erc_delete(db[i], er) | |
450 | dbase.c:142: Return value (type bool) ignored: erc_delete(db[i]... | |
451 | dbase.c:139: Body of for statement is not a block: | |
452 | if (eref_get(er).ssNum == ssNum) { erc_iterFinal(it) } | |
453 | dbase.c:139: Body of for statement is not a block: | |
454 | for (er = erc_yield(it = erc_iterStart(db[i])); !eref_equal(er, erefNIL); | |
455 | er = erc_yield(it)) if (eref_get(er).ssNum == ssNum) { erc_iterFinal(it) } | |
456 | dbase.c:137: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON }) | |
457 | (in post loop test): i <= fNON | |
458 | dbase.c: (in function promote) | |
459 | dbase.c:156: Undocumented use of global db | |
460 | dbase.c:156: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
461 | db[mNON] | |
462 | dbase.c:156: Undetected modification possible from call to unconstrained | |
463 | function _db_ercKeyGet: _db_ercKeyGet | |
464 | dbase.c:160: Undocumented use of global db | |
465 | dbase.c:160: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
466 | db[fNON] | |
467 | dbase.c:160: Undetected modification possible from call to unconstrained | |
468 | function _db_ercKeyGet: _db_ercKeyGet | |
469 | dbase.c:162: Body of if statement is not a block: return FALSE | |
470 | dbase.c:172: Undocumented use of global db | |
471 | dbase.c:172: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
472 | db[mNON] | |
473 | dbase.c:172: Undocumented modification of db[] possible from call to | |
474 | erc_delete: erc_delete(db[mNON], er) | |
475 | dbase.c:172: Return value (type bool) ignored: erc_delete(db[mN... | |
476 | dbase.c:173: Undocumented use of global db | |
477 | dbase.c:173: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
478 | db[mMGRS] | |
479 | dbase.c:173: Undocumented modification of db[] possible from call to | |
480 | erc_insert: erc_insert(db[mMGRS], er) | |
481 | dbase.c:177: Undocumented use of global db | |
482 | dbase.c:177: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
483 | db[fNON] | |
484 | dbase.c:177: Undocumented modification of db[] possible from call to | |
485 | erc_delete: erc_delete(db[fNON], er) | |
486 | dbase.c:177: Return value (type bool) ignored: erc_delete(db[fN... | |
487 | dbase.c:178: Undocumented use of global db | |
488 | dbase.c:178: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
489 | db[fMGRS] | |
490 | dbase.c:178: Undocumented modification of db[] possible from call to | |
491 | erc_insert: erc_insert(db[fMGRS], er) | |
492 | dbase.c: (in function setSalary) | |
493 | dbase.c:194: Undetected modification possible from call to unconstrained | |
494 | function _db_keyGet: _db_keyGet | |
495 | dbase.c: (in function query) | |
496 | dbase.c:226: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS | |
497 | dbase.c:226: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS, | |
498 | mNON, fNON }): i <= fNON | |
499 | dbase.c:227: Undocumented use of global db | |
500 | dbase.c:227: Undetected modification possible from call to unconstrained | |
501 | function _db_addEmpls: _db_addEmpls | |
502 | dbase.c:227: Body of for statement is not a block: | |
503 | numAdded += _db_addEmpls(db[i], l, h, s) | |
504 | dbase.c:226: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON }) | |
505 | (in post loop test): i <= fNON | |
506 | dbase.c:230: Undocumented use of global db | |
507 | dbase.c:230: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
508 | db[mMGRS] | |
509 | dbase.c:230: Undetected modification possible from call to unconstrained | |
510 | function _db_addEmpls: _db_addEmpls | |
511 | dbase.c:231: Undocumented use of global db | |
512 | dbase.c:231: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
513 | db[fMGRS] | |
514 | dbase.c:231: Undetected modification possible from call to unconstrained | |
515 | function _db_addEmpls: _db_addEmpls | |
516 | dbase.c:234: Undocumented use of global db | |
517 | dbase.c:234: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
518 | db[mNON] | |
519 | dbase.c:234: Undetected modification possible from call to unconstrained | |
520 | function _db_addEmpls: _db_addEmpls | |
521 | dbase.c:235: Undocumented use of global db | |
522 | dbase.c:235: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
523 | db[fNON] | |
524 | dbase.c:235: Undetected modification possible from call to unconstrained | |
525 | function _db_addEmpls: _db_addEmpls | |
526 | dbase.c:242: Undocumented use of global db | |
527 | dbase.c:242: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
528 | db[mMGRS] | |
529 | dbase.c:242: Undetected modification possible from call to unconstrained | |
530 | function _db_addEmpls: _db_addEmpls | |
531 | dbase.c:243: Undocumented use of global db | |
532 | dbase.c:243: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
533 | db[mNON] | |
534 | dbase.c:243: Undetected modification possible from call to unconstrained | |
535 | function _db_addEmpls: _db_addEmpls | |
536 | dbase.c:246: Undocumented use of global db | |
537 | dbase.c:246: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
538 | db[mMGRS] | |
539 | dbase.c:246: Undetected modification possible from call to unconstrained | |
540 | function _db_addEmpls: _db_addEmpls | |
541 | dbase.c:248: Undocumented use of global db | |
542 | dbase.c:248: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
543 | db[mNON] | |
544 | dbase.c:248: Undetected modification possible from call to unconstrained | |
545 | function _db_addEmpls: _db_addEmpls | |
546 | dbase.c:254: Undocumented use of global db | |
547 | dbase.c:254: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
548 | db[fMGRS] | |
549 | dbase.c:254: Undetected modification possible from call to unconstrained | |
550 | function _db_addEmpls: _db_addEmpls | |
551 | dbase.c:255: Undocumented use of global db | |
552 | dbase.c:255: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
553 | db[fNON] | |
554 | dbase.c:255: Undetected modification possible from call to unconstrained | |
555 | function _db_addEmpls: _db_addEmpls | |
556 | dbase.c:258: Undocumented use of global db | |
557 | dbase.c:258: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
558 | db[fMGRS] | |
559 | dbase.c:258: Undetected modification possible from call to unconstrained | |
560 | function _db_addEmpls: _db_addEmpls | |
561 | dbase.c:260: Undocumented use of global db | |
562 | dbase.c:260: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }: | |
563 | db[fNON] | |
564 | dbase.c:260: Undetected modification possible from call to unconstrained | |
565 | function _db_addEmpls: _db_addEmpls | |
566 | dbase.c:210: Variable er declared but not used | |
567 | dbase.c:211: Variable e declared but not used | |
568 | dbase.c:263: Suspect object listed in modifies of query not modified: s | |
569 | dbase.lcl:49: Specification of query | |
570 | dbase.c: (in function db_print) | |
571 | dbase.c:272: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS | |
572 | dbase.c:272: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS, | |
573 | mNON, fNON }): i <= fNON | |
574 | dbase.c:274: Undocumented use of global db | |
575 | dbase.c:272: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON }) | |
576 | (in post loop test): i <= fNON | |
577 | < checking drive.c > | |
578 | drive.c: (in function main) | |
579 | drive.c:22: Statement has no effect: employee_initMod() | |
580 | drive.c:23: Statement has no effect: empset_initMod() | |
581 | drive.c:48: Return value (type bool) ignored: employee_setName... | |
582 | drive.c:49: Return value (type bool) ignored: empset_insert(em... | |
583 | drive.c:64: Return value (type bool) ignored: employee_setName... | |
584 | drive.c:65: Return value (type bool) ignored: empset_delete(em... | |
585 | drive.c:82: Return value (type bool) ignored: employee_setName... | |
586 | drive.c:83: Return value (type bool) ignored: empset_insert(em... | |
587 | drive.c:107: Return value (type bool) ignored: empset_delete(em... | |
588 | drive.c:116: Body of if clause of if statement is not a block: e.gen = MALE | |
589 | drive.c:116: Body of else clause of if statement is not a block: e.gen = FEMALE | |
590 | drive.c:117: Body of if clause of if statement is not a block: e.j = NONMGR | |
591 | drive.c:117: Body of else clause of if statement is not a block: e.j = MGR | |
592 | drive.c:119: Return value (type bool) ignored: employee_setName... | |
593 | drive.c:123: Return value (type db_status) ignored: hire(e) | |
594 | drive.c:127: Assignment of db_status to int: j = hire(e) | |
595 | drive.c:131: Variable j used before definition | |
596 | drive.c:134: Return value (type bool) ignored: fire(17) | |
597 | drive.c:158: Return value (type bool) ignored: fire(empset_choo... | |
598 | drive.c:11: Parameter argv not used | |
599 | < checking macros bool.h > | |
600 | < global checks > | |
601 | dbase.c:11: Type employeeKinds declared but not used | |
602 | eref.lh:8: Function exported but not used outside eref: eref_free | |
603 | eref.h:23: Definition of eref_free | |
604 | empset.lh:8: Function exported but not used outside empset: empset_final | |
605 | empset.h:29: Definition of empset_final | |
606 | empset.lh:9: Function exported but not used outside empset: empset_clear | |
607 | empset.c:24: Definition of empset_clear | |
608 | empset.lh:11: Function exported but not used outside empset: | |
609 | empset_insertUnique | |
610 | empset.c:53: Definition of empset_insertUnique | |
611 | empset.lh:17: Function exported but not used outside empset: empset_member | |
612 | empset.h:30: Definition of empset_member | |
613 | empset.lh:18: Function exported but not used outside empset: empset_subset | |
614 | empset.c:144: Definition of empset_subset | |
615 | ereftab.lh:10: Function exported but not used outside ereftab: ereftab_delete | |
616 | ereftab.c:26: Definition of ereftab_delete | |
617 | dbase.c:13: Variable exported but not used outside dbase: db | |
618 | dbase.lh:27: Function exported but not used outside dbase: promote | |
619 | dbase.c:182: Definition of promote | |
620 | dbase.lh:28: Function exported but not used outside dbase: setSalary | |
621 | dbase.c:206: Definition of setSalary | |
622 | empset.h:10: Variable exported but not used outside empset: known | |
623 | dbase.c:15: Variable exported but not used outside dbase: initDone | |
624 | dbase.c:40: Function exported but not used outside dbase: _db_ercKeyGet | |
625 | dbase.c:54: Definition of _db_ercKeyGet | |
626 | dbase.c:56: Function exported but not used outside dbase: _db_keyGet | |
627 | dbase.c:71: Definition of _db_keyGet | |
628 | dbase.c:73: Function exported but not used outside dbase: _db_addEmpls | |
629 | dbase.c:92: Definition of _db_addEmpls | |
630 | dbase.c:13: Variable db exported but not declared in header file | |
631 | empset.c:5: Function _empset_get exported but not declared in header file | |
632 | empset.c:19: Definition of _empset_get | |
633 | dbase.c:15: Variable initDone exported but not declared in header file | |
634 | dbase.c:40: Function _db_ercKeyGet exported but not declared in header file | |
635 | dbase.c:54: Definition of _db_ercKeyGet | |
636 | dbase.c:56: Function _db_keyGet exported but not declared in header file | |
637 | dbase.c:71: Definition of _db_keyGet | |
638 | dbase.c:73: Function _db_addEmpls exported but not declared in header file | |
639 | dbase.c:92: Definition of _db_addEmpls | |
640 | < cleaning .......... > | |
641 | ||
642 | Error Type Reported Suppressed | |
643 | =================== ======== ========= | |
644 | abstract 2 0 | |
645 | mayaliasunique 1 0 | |
646 | exitarg 8 0 | |
647 | unreachable 1 0 | |
648 | forempty 1 0 | |
649 | forblock 11 0 | |
80ee600a | 650 | ifblock 22 0 |
3120b462 | 651 | redecl 0 7 |
652 | incondefs 0 1 | |
885824d3 | 653 | usedef 1 0 |
654 | noeffect 11 0 | |
655 | exporttype 5 0 | |
656 | exportvar 2 0 | |
657 | exportconst 2 0 | |
658 | globs 64 1 | |
659 | internalglobs 2 0 | |
660 | warnmissingglobs 1 6 | |
661 | retvalother 1 0 | |
662 | retvalbool 16 0 | |
663 | macroparens 4 0 | |
664 | usereleased 1 0 | |
3120b462 | 665 | compdef 3 0 |
80ee600a | 666 | compdestroy 1 0 |
885824d3 | 667 | mustfree 3 0 |
80ee600a | 668 | branchstate 2 1 |
885824d3 | 669 | onlytrans 1 0 |
670 | freshtrans 3 0 | |
671 | temptrans 3 2 | |
672 | readonlytrans 6 0 | |
673 | mods 38 0 | |
674 | mustmod 2 0 | |
675 | modfilesys 0 25 | |
676 | modnomods 4 0 | |
677 | moduncon 20 0 | |
678 | modunconnomods 1 0 | |
3120b462 | 679 | namechecks 11 6 |
680 | protoparammatch 1 0 | |
885824d3 | 681 | nullret 1 0 |
682 | nullstate 1 0 | |
683 | sizeoftype 7 0 | |
3120b462 | 684 | formalarray 0 24 |
885824d3 | 685 | type 1 0 |
686 | enumindex 24 0 | |
80ee600a | 687 | enumint 15 0 |
885824d3 | 688 | matchanyintegral 2 0 |
689 | exportlocal 15 0 | |
690 | exportheader 4 0 | |
691 | exportheadervar 2 0 | |
692 | paramuse 1 0 | |
693 | typeuse 1 0 | |
694 | varuse 4 0 | |
695 | ======== ========= | |
3120b462 | 696 | Total 333 73 |
885824d3 | 697 | |
3120b462 | 698 | Finished LCLint checking --- 333 code errors found, as expected |