home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclint-2_3h-os2-bin.zip / test / db1.expect < prev    next >
Text File  |  1997-09-03  |  35KB  |  675 lines

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