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