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