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