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