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