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