]> andersk Git - splint.git/commitdiff
Added some expect files.
authordrl7x <drl7x>
Thu, 1 Mar 2001 23:51:26 +0000 (23:51 +0000)
committerdrl7x <drl7x>
Thu, 1 Mar 2001 23:51:26 +0000 (23:51 +0000)
18 files changed:
test/bufferTest.expect
test/bufferTest.out
test/czechnames.out
test/db1.out
test/db2.out
test/db3.out
test/for.expect [new file with mode: 0644]
test/globalbufferannotation.expect [new file with mode: 0644]
test/help.expect
test/help.out
test/maxset.expect
test/maxset.out
test/null6.lcd
test/simplebufferConstraintTests.expect [new file with mode: 0644]
test/sizeoftest.expect
test/sizeoftest.out
test/tests2.2a.out
test/tests2.5/newlint.lcd

index 3fbcc7ae4fb74426a258c039fa33696de6db7ef1..4aeb1c36829d40b97a4580025185acd9d96e702e 100644 (file)
@@ -1,7 +1,7 @@
 
 test4.c: (in function t)
 test4.c:6:3: Variable g used before definition
-test4.c:15:2: Unresolved constraint:
+test4.c:6:3: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXSET ((g @ test4.c:6:3 ) )  >=  (
     100 )  needed to satisfy Requires: : MAXSET ((g @ test4.c:6:3 ) )  >=  (
     100 ) 
@@ -9,10 +9,10 @@ test6.c:2:6: Function t defined more than once
    test4.c:15:1: Previous definition of t
 test6.c: (in function t)
 test6.c:5:4: Variable g used before definition
-test6.c:7:2: Unresolved constraint:
+test6.c:6:3: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXSET ((g @ test6.c:5:4 ) )  >=  (
     1 )  needed to satisfy Requires: : MAXSET ((g @ test6.c:6:3 ) )  >=  ( 0 ) 
-test6.c:7:2: Unresolved constraint:
+test6.c:6:10: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXREAD ((g @ test6.c:5:4 ) )  >= 
     ( 2 )  needed to satisfy Requires: : MAXREAD ((g @ test6.c:6:10 ) )  >=  (
     1 ) 
index 3fbcc7ae4fb74426a258c039fa33696de6db7ef1..4aeb1c36829d40b97a4580025185acd9d96e702e 100644 (file)
@@ -1,7 +1,7 @@
 
 test4.c: (in function t)
 test4.c:6:3: Variable g used before definition
-test4.c:15:2: Unresolved constraint:
+test4.c:6:3: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXSET ((g @ test4.c:6:3 ) )  >=  (
     100 )  needed to satisfy Requires: : MAXSET ((g @ test4.c:6:3 ) )  >=  (
     100 ) 
@@ -9,10 +9,10 @@ test6.c:2:6: Function t defined more than once
    test4.c:15:1: Previous definition of t
 test6.c: (in function t)
 test6.c:5:4: Variable g used before definition
-test6.c:7:2: Unresolved constraint:
+test6.c:6:3: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXSET ((g @ test6.c:5:4 ) )  >=  (
     1 )  needed to satisfy Requires: : MAXSET ((g @ test6.c:6:3 ) )  >=  ( 0 ) 
-test6.c:7:2: Unresolved constraint:
+test6.c:6:10: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXREAD ((g @ test6.c:5:4 ) )  >= 
     ( 2 )  needed to satisfy Requires: : MAXREAD ((g @ test6.c:6:10 ) )  >=  (
     1 ) 
index 3fe4ae9ff5da8bfebf57275202fc828d66f94998..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,41 +0,0 @@
-
-Finished LCLint checking --- no code errors found
-
-czechnames.c:5:5: Variable michelob_light name violates Czech naming
-    convention.  Czech prefix michelob is not the name of a type.
-  Variable name is not consistent with Czech naming convention. (-czechvars
-  will suppress message)
-czechnames.c:26:5: Function budweiser name is not consistent with Czech naming
-                      convention.  Accessible types: pivo
-  Function or iterator name is not consistent with Czech naming convention.
-  (-czechfcns will suppress message)
-
-Finished LCLint checking --- 2 code errors found, as expected
-
-czechnames.c:26:5: Function budweiser name is not consistent with Czech naming
-                      convention.  Accessible types: pivo
-  Function or iterator name is not consistent with Czech naming convention.
-  (-czechfcns will suppress message)
-
-Finished LCLint checking --- 1 code error found, as expected
-
-czechnames.c:4:5: Variable pivo_pyet name violates Czech naming convention.
-    Czech prefix pivo names an abstract type that is not accessible.
-  Use +accessczech to allow access to type <t> in functions named <t>_<name>.
-czechnames.c:5:5: Variable michelob_light name violates Czech naming
-    convention.  Czech prefix michelob is not the name of a type.
-czechnames.c:8:17: Constant pivo_devenast name violates Czech naming
-    convention. Czech prefix pivo names an abstract type that is not
-    accessible.
-  Use +accessczech to allow access to type <t> in functions named <t>_<name>.
-czechnames.c:11:6: Function pivo_yedno name violates Czech naming convention.
-    Czech prefix pivo names an abstract type that is not accessible.
-  Use +accessczech to allow access to type <t> in functions named <t>_<name>.
-czechnames.c: (in function pivo_yedno)
-czechnames.c:15:11: Left operand of == is abstract type (pivo): p == 1
-  An abstraction barrier is broken. If necessary, use /*@access <type>@*/ to
-  allow access to an abstract type. (-abstract will suppress message)
-czechnames.c:26:5: Function budweiser name is not consistent with Czech naming
-                      convention.  Accessible types: pivo
-
-Finished LCLint checking --- 6 code errors found, as expected
index c79007ffc7aa8f14c8056c24c59c80954b41d968..4a56e7dce957688be7fb3c843d91c13a855d376d 100644 (file)
@@ -1,2 +1,689 @@
-dbase.lcl:2:1: Cannot find standard import file: stdio.lcs
-*** Cannot continue.
+
+< reading spec bool.lcl >
+< reading spec employee.lcl >
+< reading spec eref.lcl >
+< reading spec empset.lcl >
+< reading spec ereftab.lcl >
+< reading spec erc.lcl >
+< reading spec dbase.lcl >
+< preprocessing >
+< checking employee.c >
+employee.c: (in function employee_equal)
+employee.c:24: Function strncmp expects arg 3 to be size_t gets int:
+                  maxEmployeeName
+< checking eref.c >
+< checking empset.c >
+empset.c: (in function empset_insert)
+empset.c:28: Variable er declared but not used
+empset.c: (in function empset_disjointUnion)
+empset.c:85: Undocumented modification of s1 possible from call to
+                erc_iterStart (through alias s2): erc_iterStart(s2)
+empset.c:85: Undocumented modification of s2 possible from call to
+                erc_iterStart: erc_iterStart(s2)
+empset.c: (in function empset_union)
+empset.c:108: Undocumented modification of s2 possible from call to
+                 erc_iterStart (through alias s1): erc_iterStart(s1)
+empset.c:108: Undocumented modification of s1 possible from call to
+                 erc_iterStart: erc_iterStart(s1)
+empset.c: (in function empset_subset)
+empset.c:139: Undocumented modification of s1 possible from call to
+                 erc_iterStart: erc_iterStart(s1)
+empset.c:135: Variable e declared but not used
+< checking ereftab.c >
+ereftab.c: (in function ereftab_lookup)
+ereftab.c:34: Undocumented modification of t possible from call to
+                 erc_iterStart: erc_iterStart(t)
+< checking erc.c >
+erc.c: (in function erc_member)
+erc.c:47: Operands of == are abstract type (eref): tmpc->val == er
+erc.c: (in function erc_delete)
+erc.c:78: Operands of == are abstract type (eref): elem->val == er
+erc.c: (in function erc_sprint)
+erc.c:141: Function malloc expects arg 1 to be size_t gets int:
+              erc_size(c) * (employeePrintSize + 1) + 1
+erc.c:151: Undocumented modification of c possible from call to erc_iterStart:
+              erc_iterStart(c)
+< checking dbase.c >
+dbase.c: (in function query)
+dbase.c:210: Variable er declared but not used
+dbase.c:211: Variable e declared but not used
+< checking drive.c >
+drive.c: (in function main)
+drive.c:123: Return value (type db_status) ignored: hire(e)
+< checking macros bool.h >
+< global checks >
+< cleaning .......... >
+
+Finished LCLint checking --- 16 code errors found, as expected
+
+< reading spec bool.lcl >
+< reading spec employee.lcl >
+< reading spec eref.lcl >
+< reading spec empset.lcl >
+< reading spec ereftab.lcl >
+< reading spec erc.lcl >
+< reading spec dbase.lcl >
+< preprocessing >
+employee.h:2: Name EMPLOYEE_H is reserved for future ANSI library extensions.
+    Macros beginning with E and a digit or uppercase letter may be added to
+    <errno.h>. (See ANSI, Section 4.13.1)
+< more preprocessing . >
+eref.h:2: Name EREF_H is reserved for future ANSI library extensions. Macros
+    beginning with E and a digit or uppercase letter may be added to <errno.h>.
+    (See ANSI, Section 4.13.1)
+< more preprocessing . >
+empset.h:2: Name EMPSET_H is reserved for future ANSI library extensions.
+    Macros beginning with E and a digit or uppercase letter may be added to
+    <errno.h>. (See ANSI, Section 4.13.1)
+< more preprocessing . >
+erc.h:2: Name ERC_H is reserved for future ANSI library extensions. Macros
+    beginning with E and a digit or uppercase letter may be added to <errno.h>.
+    (See ANSI, Section 4.13.1)
+< more preprocessing . >
+ereftab.h:4: Name EREFTAB_H is reserved for future ANSI library extensions.
+    Macros beginning with E and a digit or uppercase letter may be added to
+    <errno.h>. (See ANSI, Section 4.13.1)
+< more preprocessing . >
+< checking employee.c >
+bool.h:20: Modifies list for bool_initMod uses global internal state, not
+              included in globals list.
+   bool.h:20: Declaration of bool_initMod
+employee.c: (in function employee_setName)
+employee.c:11: Body of if statement is not a block: return FALSE
+employee.c:14: Parameter 1 (e->name) to function strcpy is declared unique but
+                  may be aliased externally by parameter 2 (na)
+employee.c: (in function employee_equal)
+employee.c:24: Function strncmp expects arg 3 to be size_t gets int:
+                  maxEmployeeName
+employee.c: (in function employee_sprint)
+employee.c:29: Read-only string literal storage used as initial value for
+                  unqualified storage: gender[0] = "male"
+employee.c:29: Read-only string literal storage used as initial value for
+                  unqualified storage: gender[1] = "female"
+employee.c:29: Read-only string literal storage used as initial value for
+                  unqualified storage: gender[2] = "?"
+employee.c:30: Read-only string literal storage used as initial value for
+                  unqualified storage: jobs[0] = "manager"
+employee.c:30: Read-only string literal storage used as initial value for
+                  unqualified storage: jobs[1] = "non-manager"
+employee.c:30: Read-only string literal storage used as initial value for
+                  unqualified storage: jobs[2] = "?"
+employee.c:33: Array fetch using non-integer, gender: gender[e.gen]
+employee.c:33: Array fetch using non-integer, job: jobs[e.j]
+employee.h: (in macro employee_initMod)
+employee.h:10: Called procedure bool_initMod may access internal state, but
+                  globals list does not include globals internalState
+employee.h:10: Undocumented modification of internal state possible from call
+                  to bool_initMod: bool_initMod()
+< checking eref.c >
+eref.h:9: Constant exported, but not specified: used
+eref.h:9: Constant exported, but not specified: avail
+eref.h:9: Type exported, but not specified: eref_status
+eref.h:14: Type exported, but not specified: eref_ERP
+eref.h:17: Variable exported, but not specified: eref_Pool
+eref.c: (in function eref_alloc)
+eref.c:12: Undocumented use of global eref_Pool
+eref.c:12: Undocumented use of global eref_Pool
+eref.c:12: Body of for statement is empty
+eref.c:12: Undocumented use of global eref_Pool (in post loop test)
+eref.c:16: Undocumented use of global eref_Pool
+eref.c:18: Undocumented use of global eref_Pool
+eref.c:19: Undocumented use of global eref_Pool
+eref.c:20: Undocumented use of global eref_Pool
+eref.c:20: Parameter to sizeof is type employee: sizeof(employee)
+eref.c:19: Undocumented modification of *(eref_Pool.conts) possible from call
+    to realloc: realloc(eref_Pool.conts, 2 * eref_Pool.size * sizeof(employee))
+eref.c:18: Undocumented modification of eref_Pool.conts:
+    eref_Pool.conts = (employee *)realloc(eref_Pool.conts, 2 * eref_Pool.size *
+    sizeof(employee))
+eref.c:22: Undocumented use of global eref_Pool
+eref.c:25: Argument to exit has implementation defined behavior: 1
+eref.c:28: Undocumented use of global eref_Pool
+eref.c:29: Undocumented use of global eref_Pool
+eref.c:30: Undocumented use of global eref_Pool
+eref.c:30: Parameter to sizeof is type eref_status: sizeof(eref_status)
+eref.c:29: Undocumented modification of *(eref_Pool.status) possible from call
+    to realloc: realloc(eref_Pool.status, 2 * eref_Pool.size *
+    sizeof(eref_status))
+eref.c:28: Undocumented modification of eref_Pool.status:
+    eref_Pool.status = (eref_status *)realloc(eref_Pool.status, 2 *
+    eref_Pool.size * sizeof(eref_status))
+eref.c:32: Undocumented use of global eref_Pool
+eref.c:35: Argument to exit has implementation defined behavior: 1
+eref.c:38: Undocumented use of global eref_Pool
+eref.c:38: Undocumented use of global eref_Pool
+eref.c:38: Undocumented modification of eref_Pool.size:
+              eref_Pool.size = 2 * eref_Pool.size
+eref.c:40: Undocumented use of global eref_Pool
+eref.c:41: Undocumented use of global eref_Pool
+eref.c:41: Undocumented modification of eref_Pool.status[]:
+              eref_Pool.status[i] = avail
+eref.c:41: Body of for statement is not a block: eref_Pool.status[i] = avail
+eref.c:41: Undocumented use of global eref_Pool (in post loop test)
+eref.c:44: Undocumented use of global eref_Pool
+eref.c:44: Undocumented modification of eref_Pool.status[]:
+              eref_Pool.status[res] = used
+eref.c: (in function eref_initMod)
+eref.c:53: Undocumented use of file static needsInit
+eref.c:58: Undocumented use of file static needsInit
+eref.c:58: Undocumented modification of needsInit: needsInit = FALSE
+eref.c:60: Statement has no effect: employee_initMod()
+eref.c:62: Undocumented use of global eref_Pool
+eref.c:62: Parameter to sizeof is type employee: sizeof(employee)
+eref.c:62: Undocumented modification of eref_Pool.conts:
+              eref_Pool.conts = (employee *)malloc(size * sizeof(employee))
+eref.c:62: Implicitly only storage eref_Pool.conts not released before
+    assignment: eref_Pool.conts = (employee *)malloc(size * sizeof(employee))
+eref.c:64: Undocumented use of global eref_Pool
+eref.c:67: Argument to exit has implementation defined behavior: 1
+eref.c:70: Undocumented use of global eref_Pool
+eref.c:70: Parameter to sizeof is type eref_status: sizeof(eref_status)
+eref.c:70: Undocumented modification of eref_Pool.status:
+    eref_Pool.status = (eref_status *)malloc(size * sizeof(eref_status))
+eref.c:70: Implicitly only storage eref_Pool.status not released before
+    assignment: eref_Pool.status = (eref_status *)malloc(size *
+    sizeof(eref_status))
+eref.c:72: Undocumented use of global eref_Pool
+eref.c:75: Argument to exit has implementation defined behavior: 1
+eref.c:78: Undocumented use of global eref_Pool
+eref.c:78: Undocumented modification of eref_Pool.size: eref_Pool.size = size
+eref.c:82: Undocumented use of global eref_Pool
+eref.c:82: Undocumented modification of eref_Pool.status[]:
+              eref_Pool.status[i] = avail
+eref.c:84: Global storage *(eref_Pool.conts) contains 4 undefined fields when
+              call returns: ssNum, salary, gen, j
+eref.c:84: Global storage eref_Pool contains 1 undefined field when call
+              returns: status
+eref.h: (in macro eref_free)
+eref.h:23: Undocumented use of global eref_Pool
+eref.h:23: Undocumented modification of eref_Pool.status[]:
+              eref_Pool.status[er] = avail
+eref.h: (in macro eref_assign)
+eref.h:24: Undocumented use of global eref_Pool
+eref.h:24: Macro parameter used without parentheses: e
+eref.h:24: Undocumented modification of eref_Pool.conts[]:
+              eref_Pool.conts[er] = e
+eref.h: (in macro eref_get)
+eref.h:25: Undocumented use of global eref_Pool
+eref.h: (in macro eref_equal)
+eref.h:26: Macro parameter used without parentheses: er1
+eref.h:26: Macro parameter used without parentheses: er2
+< checking empset.c >
+erc.h:6: Type exported, but not specified: ercElem
+erc.h:7: Type exported, but not specified: ercList
+erc.h:8: Type exported, but not specified: ercInfo
+empset.h:10: Variable exported, but not specified: known
+empset.c:5: Name _empset_get is in the implementation name space (any
+               identifier beginning with underscore)
+empset.c: (in function _empset_get)
+empset.c:11: Undocumented modification of s possible from call to
+                erc_iterStart: erc_iterStart(s)
+empset.c:15: Body of if statement is not a block:
+                do { { erc_iterFinal(it) } } while (FALSE)
+empset.c: (in function empset_insert)
+empset.c:30: Undetected modification possible from call to unconstrained
+                function _empset_get: _empset_get
+empset.c:28: Variable er declared but not used
+empset.c: (in function empset_insertUnique)
+empset.c:43: Undocumented use of global known
+empset.c:49: Undocumented use of global known
+empset.c:49: Undocumented modification of known possible from call to
+                ereftab_insert: ereftab_insert(known, e, er)
+empset.c: (in function empset_delete)
+empset.c:59: Undetected modification possible from call to unconstrained
+                function _empset_get: _empset_get
+empset.c: (in function empset_disjointUnion)
+empset.c:85: Undocumented modification of s1 possible from call to
+                erc_iterStart (through alias s2): erc_iterStart(s2)
+empset.c:85: Undocumented modification of s2 possible from call to
+                erc_iterStart: erc_iterStart(s2)
+empset.c:86: Body of for statement is not a block:
+                empset_insertUnique(result, eref_get(er))
+empset.c: (in function empset_union)
+empset.c:108: Undocumented modification of s2 possible from call to
+                 erc_iterStart (through alias s1): erc_iterStart(s1)
+empset.c:108: Undocumented modification of s1 possible from call to
+                 erc_iterStart: erc_iterStart(s1)
+empset.c:110: Body of if statement is not a block: erc_insert(result, er)
+empset.c:109: Body of for statement is not a block:
+                 if (!empset_member(eref_get(er), s2)) erc_insert(result, er)
+empset.c: (in function empset_intersect)
+empset.c:125: Body of if statement is not a block: erc_insert(toDelete, er)
+empset.c:124: Body of for statement is not a block:
+                 if (!empset_member(eref_get(er), s2)) erc_insert(toDelete, er)
+empset.c:128: Return value (type bool) ignored: erc_delete(s1, er)
+empset.c:128: Body of for statement is not a block: erc_delete(s1, er)
+empset.c: (in function empset_subset)
+empset.c:139: Undocumented modification of s1 possible from call to
+                 erc_iterStart: erc_iterStart(s1)
+empset.c:141: Body of if statement is not a block:
+                 do { { erc_iterFinal(it) } } while (FALSE)
+empset.c:140: Body of for statement is not a block:
+                 if (!empset_member(eref_get(er), s2)) do { { erc_iterFinal(it)
+                 } } while (FALSE)
+empset.c:135: Variable e declared but not used
+empset.c: (in function empset_initMod)
+empset.c:148: Undocumented use of file static initDone
+empset.c:148: Body of if statement is not a block: return
+empset.c:151: Statement has no effect: employee_initMod()
+empset.c:153: Statement has no effect: erc_initMod()
+empset.c:154: Statement has no effect: ereftab_initMod()
+empset.c:155: Undocumented use of global known
+empset.c:155: Undocumented modification of known: known = ereftab_create()
+empset.c:156: Undocumented use of file static initDone
+empset.c:156: Undocumented modification of initDone: initDone = TRUE
+empset.h: (in macro empset_member)
+empset.h:30: Undetected modification possible from call to unconstrained
+                function _empset_get: _empset_get
+< checking ereftab.c >
+ereftab.c: (in function ereftab_delete)
+ereftab.c:24: Return value (type bool) ignored: erc_delete(t, er)
+ereftab.c: (in function ereftab_lookup)
+ereftab.c:34: Undocumented modification of t possible from call to
+                 erc_iterStart: erc_iterStart(t)
+ereftab.c:37: Body of if statement is not a block: return er
+ereftab.c: (in function ereftab_initMod)
+ereftab.c:47: Statement has no effect: erc_initMod()
+< checking erc.c >
+erc.c: (in function erc_create)
+erc.c:8: Parameter to sizeof is type ercInfo: sizeof(ercInfo)
+erc.c:13: Argument to exit has implementation defined behavior: 1
+erc.c:18: Null storage c->vals derivable from return value: c
+   erc.c:16: Storage c->vals becomes null
+erc.c:18: Fresh storage returned as unqualified (should be only): c
+   erc.c:8: Fresh storage c allocated
+erc.c: (in function erc_clear)
+erc.c:34: Function returns with null storage derivable from parameter c->vals
+   erc.c:32: Storage c->vals becomes null
+erc.c: (in function erc_final)
+erc.c:39: Implicitly temp storage c passed as only param: free (c)
+erc.c: (in function erc_member)
+erc.c:47: Operands of == are abstract type (eref): tmpc->val == er
+erc.c:47: Body of if statement is not a block: return TRUE
+erc.c:47: Body of for statement is not a block:
+             if (tmpc->val == er) return TRUE
+erc.c: (in function erc_insert)
+erc.c:55: Parameter to sizeof is type ercElem: sizeof(ercElem)
+erc.c:60: Argument to exit has implementation defined behavior: 1
+erc.c: (in function erc_delete)
+erc.c:78: Operands of == are abstract type (eref): elem->val == er
+erc.c:83: Implicitly only storage prev->next not released before assignment:
+             prev->next = elem->next
+erc.c:83: Clauses exit with elem referencing implicitly only storage in true
+             branch, local storage in false branch
+   erc.c:81: Storage elem becomes implicitly only
+erc.c:83: Storage c->vals->next is kept in one path, but live in another.
+   erc.c:83: Storage c->vals->next becomes kept
+erc.c:81: Body of if clause of if statement is not a block:
+             c->vals = elem->next
+erc.c:83: Body of else clause of if statement is not a block:
+             prev->next = elem->next
+erc.c:87: Released storage c->vals reachable from parameter at return point
+   erc.c:85: Storage c->vals is released
+erc.c: (in function erc_iterStart)
+erc.c:98: Parameter to sizeof is type ercList: sizeof(ercList)
+erc.c:103: Argument to exit has implementation defined behavior: 1
+erc.c:107: Fresh storage returned as unqualified (should be only): result
+   erc.c:98: Fresh storage result allocated
+erc.c:108: Suspect object listed in modifies of erc_iterStart not modified: c
+   erc.lcl:49: Specification of erc_iterStart
+erc.c: (in function erc_yield)
+erc.c:117: Implicitly temp storage it passed as only param: free (it)
+erc.c:117: Unreachable code: free(it)
+erc.c:118: Variable it is released in true branch, but live in continuation.
+   erc.c:117: Storage it is released
+erc.c:121: Only storage *it->next assigned to unqualified: *(it) = (*it)->next
+erc.c: (in function erc_join)
+erc.c:130: Body of for statement is not a block: erc_insert(c1, tmpc->val)
+erc.c: (in function erc_sprint)
+erc.c:141: Function malloc expects arg 1 to be size_t gets int:
+              erc_size(c) * (employeePrintSize + 1) + 1
+erc.c:146: Argument to exit has implementation defined behavior: 1
+erc.c:151: Undocumented modification of c possible from call to erc_iterStart:
+              erc_iterStart(c)
+erc.c:159: Fresh storage returned as unqualified (should be only): result
+   erc.c:140: Fresh storage result allocated
+erc.h: (in macro erc_choose)
+erc.h:15: Macro parameter used without parentheses: c
+erc.h: (in macro erc_initMod)
+erc.h:16: Called procedure bool_initMod may access internal state, but globals
+             list does not include globals internalState
+erc.h:16: Undocumented modification of internal state possible from call to
+             bool_initMod: bool_initMod()
+erc.h:16: Statement has no effect: employee_initMod()
+erc.h: (in macro erc_iterFinal)
+erc.h:20: Implicitly temp storage it passed as only param: free (it)
+< checking dbase.c >
+dbase.c: (in function db_initMod)
+dbase.c:21: Undocumented use of global initDone
+dbase.c:27: Statement has no effect: employee_initMod()
+dbase.c:29: Statement has no effect: erc_initMod()
+dbase.c:30: Statement has no effect: empset_initMod()
+dbase.c:32: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
+dbase.c:32: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
+               mNON, fNON }): i <= fNON
+dbase.c:34: Undocumented use of global db
+dbase.c:34: Undocumented modification of db[]: db[i] = erc_create()
+dbase.c:32: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
+               (in post loop test): i <= fNON
+dbase.c:37: Undocumented use of global initDone
+dbase.c:37: Undocumented modification of initDone: initDone = TRUE
+dbase.c:40: Name _db_ercKeyGet is in the implementation name space (any
+               identifier beginning with underscore)
+dbase.c: (in function _db_ercKeyGet)
+dbase.c:45: Undocumented modification of c possible from call to erc_iterStart:
+               erc_iterStart(c)
+dbase.c:56: Name _db_keyGet is in the implementation name space (any identifier
+               beginning with underscore)
+dbase.c: (in function _db_keyGet)
+dbase.c:61: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
+dbase.c:61: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
+               mNON, fNON }): i <= fNON
+dbase.c:63: Undocumented use of global db
+dbase.c:63: Undetected modification possible from call to unconstrained
+               function _db_ercKeyGet: _db_ercKeyGet
+dbase.c:61: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
+               (in post loop test): i <= fNON
+dbase.c:73: Name _db_addEmpls is in the implementation name space (any
+               identifier beginning with underscore)
+dbase.c: (in function _db_addEmpls)
+dbase.c:81: Undocumented modification of c possible from call to erc_iterStart:
+               erc_iterStart(c)
+dbase.c:86: Undocumented modification of s possible from call to empset_insert:
+               empset_insert(s, e)
+dbase.c:86: Return value (type bool) ignored: empset_insert(s, e)
+dbase.c: (in function hire)
+dbase.c:97: Body of if statement is not a block: return genderERR
+dbase.c:100: Body of if statement is not a block: return jobERR
+dbase.c:103: Body of if statement is not a block: return salERR
+dbase.c:105: Undetected modification possible from call to unconstrained
+                function _db_keyGet: _db_keyGet
+dbase.c:106: Body of if statement is not a block: return duplERR
+dbase.c: (in function uncheckedHire)
+dbase.c:121: Undocumented use of global db
+dbase.c:121: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mMGRS]
+dbase.c:121: Undocumented modification of db[] possible from call to
+                erc_insert: erc_insert(db[mMGRS], er)
+dbase.c:123: Undocumented use of global db
+dbase.c:123: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mNON]
+dbase.c:123: Undocumented modification of db[] possible from call to
+                erc_insert: erc_insert(db[mNON], er)
+dbase.c:121: Body of if clause of if statement is not a block:
+                erc_insert(db[mMGRS], er)
+dbase.c:123: Body of else clause of if statement is not a block:
+                erc_insert(db[mNON], er)
+dbase.c:126: Undocumented use of global db
+dbase.c:126: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fMGRS]
+dbase.c:126: Undocumented modification of db[] possible from call to
+                erc_insert: erc_insert(db[fMGRS], er)
+dbase.c:128: Undocumented use of global db
+dbase.c:128: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fNON]
+dbase.c:128: Undocumented modification of db[] possible from call to
+                erc_insert: erc_insert(db[fNON], er)
+dbase.c:126: Body of if clause of if statement is not a block:
+                erc_insert(db[fMGRS], er)
+dbase.c:128: Body of else clause of if statement is not a block:
+                erc_insert(db[fNON], er)
+dbase.c:123: Body of if clause of if statement is not a block:
+    if (e.j == MGR) erc_insert(db[mMGRS], er) else erc_insert(db[mNON], er)
+dbase.c: (in function fire)
+dbase.c:137: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
+dbase.c:137: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
+                mNON, fNON }): i <= fNON
+dbase.c:138: Undocumented use of global db
+dbase.c:138: Undocumented modification of db[] possible from call to
+                erc_iterStart: erc_iterStart(db[i])
+dbase.c:142: Undocumented use of global db
+dbase.c:142: Undocumented modification of db[] possible from call to
+                erc_delete: erc_delete(db[i], er)
+dbase.c:142: Return value (type bool) ignored: erc_delete(db[i]...
+dbase.c:139: Body of for statement is not a block:
+                if (eref_get(er).ssNum == ssNum) { erc_iterFinal(it) }
+dbase.c:139: Body of for statement is not a block:
+    for (er = erc_yield(it = erc_iterStart(db[i])); !eref_equal(er, erefNIL);
+    er = erc_yield(it)) if (eref_get(er).ssNum == ssNum) { erc_iterFinal(it) }
+dbase.c:137: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
+                (in post loop test): i <= fNON
+dbase.c: (in function promote)
+dbase.c:156: Undocumented use of global db
+dbase.c:156: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mNON]
+dbase.c:156: Undetected modification possible from call to unconstrained
+                function _db_ercKeyGet: _db_ercKeyGet
+dbase.c:160: Undocumented use of global db
+dbase.c:160: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fNON]
+dbase.c:160: Undetected modification possible from call to unconstrained
+                function _db_ercKeyGet: _db_ercKeyGet
+dbase.c:162: Body of if statement is not a block: return FALSE
+dbase.c:172: Undocumented use of global db
+dbase.c:172: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mNON]
+dbase.c:172: Undocumented modification of db[] possible from call to
+                erc_delete: erc_delete(db[mNON], er)
+dbase.c:172: Return value (type bool) ignored: erc_delete(db[mN...
+dbase.c:173: Undocumented use of global db
+dbase.c:173: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mMGRS]
+dbase.c:173: Undocumented modification of db[] possible from call to
+                erc_insert: erc_insert(db[mMGRS], er)
+dbase.c:177: Undocumented use of global db
+dbase.c:177: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fNON]
+dbase.c:177: Undocumented modification of db[] possible from call to
+                erc_delete: erc_delete(db[fNON], er)
+dbase.c:177: Return value (type bool) ignored: erc_delete(db[fN...
+dbase.c:178: Undocumented use of global db
+dbase.c:178: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fMGRS]
+dbase.c:178: Undocumented modification of db[] possible from call to
+                erc_insert: erc_insert(db[fMGRS], er)
+dbase.c: (in function setSalary)
+dbase.c:194: Undetected modification possible from call to unconstrained
+                function _db_keyGet: _db_keyGet
+dbase.c: (in function query)
+dbase.c:226: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
+dbase.c:226: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
+                mNON, fNON }): i <= fNON
+dbase.c:227: Undocumented use of global db
+dbase.c:227: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:227: Body of for statement is not a block:
+                numAdded += _db_addEmpls(db[i], l, h, s)
+dbase.c:226: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
+                (in post loop test): i <= fNON
+dbase.c:230: Undocumented use of global db
+dbase.c:230: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mMGRS]
+dbase.c:230: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:231: Undocumented use of global db
+dbase.c:231: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fMGRS]
+dbase.c:231: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:234: Undocumented use of global db
+dbase.c:234: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mNON]
+dbase.c:234: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:235: Undocumented use of global db
+dbase.c:235: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fNON]
+dbase.c:235: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:242: Undocumented use of global db
+dbase.c:242: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mMGRS]
+dbase.c:242: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:243: Undocumented use of global db
+dbase.c:243: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mNON]
+dbase.c:243: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:246: Undocumented use of global db
+dbase.c:246: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mMGRS]
+dbase.c:246: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:248: Undocumented use of global db
+dbase.c:248: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[mNON]
+dbase.c:248: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:254: Undocumented use of global db
+dbase.c:254: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fMGRS]
+dbase.c:254: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:255: Undocumented use of global db
+dbase.c:255: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fNON]
+dbase.c:255: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:258: Undocumented use of global db
+dbase.c:258: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fMGRS]
+dbase.c:258: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:260: Undocumented use of global db
+dbase.c:260: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
+                db[fNON]
+dbase.c:260: Undetected modification possible from call to unconstrained
+                function _db_addEmpls: _db_addEmpls
+dbase.c:210: Variable er declared but not used
+dbase.c:211: Variable e declared but not used
+dbase.c:263: Suspect object listed in modifies of query not modified: s
+   dbase.lcl:49: Specification of query
+dbase.c: (in function db_print)
+dbase.c:272: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
+dbase.c:272: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
+                mNON, fNON }): i <= fNON
+dbase.c:274: Undocumented use of global db
+dbase.c:272: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
+                (in post loop test): i <= fNON
+< checking drive.c >
+drive.c: (in function main)
+drive.c:22: Statement has no effect: employee_initMod()
+drive.c:23: Statement has no effect: empset_initMod()
+drive.c:48: Return value (type bool) ignored: employee_setName...
+drive.c:49: Return value (type bool) ignored: empset_insert(em...
+drive.c:64: Return value (type bool) ignored: employee_setName...
+drive.c:65: Return value (type bool) ignored: empset_delete(em...
+drive.c:82: Return value (type bool) ignored: employee_setName...
+drive.c:83: Return value (type bool) ignored: empset_insert(em...
+drive.c:107: Return value (type bool) ignored: empset_delete(em...
+drive.c:116: Body of if clause of if statement is not a block: e.gen = MALE
+drive.c:116: Body of else clause of if statement is not a block: e.gen = FEMALE
+drive.c:117: Body of if clause of if statement is not a block: e.j = NONMGR
+drive.c:117: Body of else clause of if statement is not a block: e.j = MGR
+drive.c:119: Return value (type bool) ignored: employee_setName...
+drive.c:123: Return value (type db_status) ignored: hire(e)
+drive.c:127: Assignment of db_status to int: j = hire(e)
+drive.c:131: Variable j used before definition
+drive.c:134: Return value (type bool) ignored: fire(17)
+drive.c:158: Return value (type bool) ignored: fire(empset_choo...
+drive.c:11: Parameter argv not used
+< checking macros bool.h >
+< global checks >
+dbase.c:11: Type employeeKinds declared but not used
+eref.lh:8: Function exported but not used outside eref: eref_free
+   eref.h:23: Definition of eref_free
+empset.lh:8: Function exported but not used outside empset: empset_final
+   empset.h:29: Definition of empset_final
+empset.lh:9: Function exported but not used outside empset: empset_clear
+   empset.c:24: Definition of empset_clear
+empset.lh:11: Function exported but not used outside empset:
+                 empset_insertUnique
+   empset.c:53: Definition of empset_insertUnique
+empset.lh:17: Function exported but not used outside empset: empset_member
+   empset.h:30: Definition of empset_member
+empset.lh:18: Function exported but not used outside empset: empset_subset
+   empset.c:144: Definition of empset_subset
+ereftab.lh:10: Function exported but not used outside ereftab: ereftab_delete
+   ereftab.c:26: Definition of ereftab_delete
+dbase.c:13: Variable exported but not used outside dbase: db
+dbase.lh:27: Function exported but not used outside dbase: promote
+   dbase.c:182: Definition of promote
+dbase.lh:28: Function exported but not used outside dbase: setSalary
+   dbase.c:206: Definition of setSalary
+empset.h:10: Variable exported but not used outside empset: known
+dbase.c:15: Variable exported but not used outside dbase: initDone
+dbase.c:40: Function exported but not used outside dbase: _db_ercKeyGet
+   dbase.c:54: Definition of _db_ercKeyGet
+dbase.c:56: Function exported but not used outside dbase: _db_keyGet
+   dbase.c:71: Definition of _db_keyGet
+dbase.c:73: Function exported but not used outside dbase: _db_addEmpls
+   dbase.c:92: Definition of _db_addEmpls
+dbase.c:13: Variable db exported but not declared in header file
+empset.c:5: Function _empset_get exported but not declared in header file
+   empset.c:19: Definition of _empset_get
+dbase.c:15: Variable initDone exported but not declared in header file
+dbase.c:40: Function _db_ercKeyGet exported but not declared in header file
+   dbase.c:54: Definition of _db_ercKeyGet
+dbase.c:56: Function _db_keyGet exported but not declared in header file
+   dbase.c:71: Definition of _db_keyGet
+dbase.c:73: Function _db_addEmpls exported but not declared in header file
+   dbase.c:92: Definition of _db_addEmpls
+< cleaning .......... >
+
+Error Type                Reported  Suppressed
+===================       ========  =========
+abstract                     2           0
+mayaliasunique               1           0
+exitarg                      8           0
+unreachable                  1           0
+forempty                     1           0
+forblock                    11           0
+ifblock                     24           0
+usedef                       1           0
+noeffect                    11           0
+exporttype                   5           0
+exportvar                    2           0
+exportconst                  2           0
+globs                       64           1
+internalglobs                2           0
+warnmissingglobs             1           6
+retvalother                  1           0
+retvalbool                  16           0
+macroparens                  4           0
+usereleased                  1           0
+compdef                      2           0
+mustfree                     3           0
+branchstate                  3           2
+onlytrans                    1           0
+freshtrans                   3           0
+temptrans                    3           2
+readonlytrans                6           0
+mods                        38           0
+mustmod                      2           0
+modfilesys                   0          25
+modnomods                    4           0
+moduncon                    20           0
+modunconnomods               1           0
+ansireserved                 9           0
+fcnpost                      0          65
+fcnconstraint                0          15
+nullret                      1           0
+nullstate                    1           0
+sizeoftype                   7           0
+formalarray                  0          17
+type                         1           0
+enumindex                   24           0
+relaxtypes                  15           0
+matchanyintegral             2           0
+exportlocal                 15           0
+exportheader                 4           0
+exportheadervar              2           0
+paramuse                     1           0
+typeuse                      1           0
+varuse                       4           0
+                          ========  =========
+Total                      331         133
+
+Finished LCLint checking --- 331 code errors found, as expected
index 64c29c19f775f9f3abe00e3de1e95998ec1ae073..9ad7275ab002df5defea079ba132cf40315f9cf1 100644 (file)
@@ -1,4 +1,169 @@
 
 < reading spec employee.lcl >
-employee.lcl:2: Cannot find standard import file: stdio.lcs
-*** Cannot continue.
+< reading spec eref.lcl >
+< reading spec empset.lcl >
+< reading spec ereftab.lcl >
+< reading spec erc.lcl >
+< reading spec dbase.lcl >
+< preprocessing >
+< checking employee.c >
+employee.c: (in function employee_setName)
+employee.c:14: Parameter 1 (e->name) to function strcpy is declared unique but
+                  may be aliased externally by parameter 2 (na)
+< checking eref.c >
+eref.c: (in function eref_alloc)
+eref.c:19: Unqualified storage eref_Pool.conts passed as only param:
+              realloc (eref_Pool.conts, ...)
+eref.c:29: Unqualified storage eref_Pool.status passed as only param:
+              realloc (eref_Pool.status, ...)
+eref.c:45: Storage eref_Pool.status reachable from global is only (should be
+              unqualified)
+   eref.c:30: Storage eref_Pool.status becomes only
+eref.c:45: Storage eref_Pool.conts reachable from global is only (should be
+              unqualified)
+   eref.c:20: Storage eref_Pool.conts becomes only
+eref.c: (in function eref_initMod)
+eref.c:84: Storage eref_Pool.conts reachable from global is fresh (should be
+              unqualified)
+   eref.c:62: Fresh storage eref_Pool.conts allocated
+eref.c:84: Global storage *(eref_Pool.conts) contains 4 undefined fields when
+              call returns: ssNum, salary, gen, j
+eref.c:84: Storage eref_Pool.status reachable from global is fresh (should be
+              unqualified)
+   eref.c:70: Fresh storage eref_Pool.status allocated
+eref.c:84: Global storage eref_Pool contains 1 undefined field when call
+              returns: status
+< checking empset.c >
+< checking ereftab.c >
+< checking erc.c >
+erc.c: (in function erc_create)
+erc.c:33: Null storage c->vals derivable from return value: c
+   erc.c:31: Storage c->vals becomes null
+erc.c:33: Fresh storage returned as unqualified (should be only): c
+   erc.c:23: Fresh storage c allocated
+erc.c: (in function erc_clear)
+erc.c:49: Function returns with null storage derivable from parameter c->vals
+   erc.c:47: Storage c->vals becomes null
+erc.c: (in function erc_final)
+erc.c:54: Implicitly temp storage c passed as only param: free (c)
+erc.c: (in function erc_delete)
+erc.c:102: Released storage c->vals reachable from parameter at return point
+   erc.c:100: Storage c->vals is released
+erc.c: (in function erc_sprint)
+erc.c:141: Fresh storage returned as unqualified (should be only): result
+   erc.c:122: Fresh storage result allocated
+< checking dbase.c >
+< checking drive.c >
+< checking macros bool.h >
+< global checks >
+
+Finished LCLint checking --- 15 code errors found, as expected
+
+< reading spec employee.lcl >
+< reading spec eref.lcl >
+< reading spec empset.lcl >
+< reading spec ereftab.lcl >
+< reading spec erc.lcl >
+< reading spec dbase.lcl >
+< preprocessing >
+< checking employee.c >
+employee.c: (in function employee_setName)
+employee.c:14: Parameter 1 (e->name) to function strcpy is declared unique but
+                  may be aliased externally by parameter 2 (na)
+< checking eref.c >
+eref.c: (in function eref_initMod)
+eref.c:62: Implicitly only storage eref_Pool.conts not released before
+    assignment: eref_Pool.conts = (employee *)malloc(size * sizeof(employee))
+eref.c:70: Implicitly only storage eref_Pool.status not released before
+    assignment: eref_Pool.status = (eref_status *)malloc(size *
+    sizeof(eref_status))
+eref.c:84: Global storage *(eref_Pool.conts) contains 4 undefined fields when
+              call returns: ssNum, salary, gen, j
+eref.c:84: Global storage eref_Pool contains 1 undefined field when call
+              returns: status
+< checking empset.c >
+empset.c: (in function empset_insertUnique)
+empset.c:44: Clauses exit with er referencing fresh storage in true branch,
+                local storage in continuation
+   empset.c:41: Fresh storage er allocated
+empset.c: (in function empset_intersect)
+empset.c:126: Fresh storage toDelete not released before return
+   empset.c:112: Fresh storage toDelete allocated
+< checking ereftab.c >
+< checking erc.c >
+erc.c: (in function erc_create)
+erc.c:33: Null storage c->vals derivable from return value: c
+   erc.c:31: Storage c->vals becomes null
+erc.c: (in function erc_clear)
+erc.c:49: Function returns with null storage derivable from parameter c->vals
+   erc.c:47: Storage c->vals becomes null
+erc.c: (in function erc_final)
+erc.c:54: Implicitly temp storage c passed as only param: free (c)
+erc.c: (in function erc_delete)
+erc.c:98: Implicitly only storage prev->next not released before assignment:
+             prev->next = elem->next
+erc.c:98: Clauses exit with elem referencing implicitly only storage in true
+             branch, local storage in false branch
+   erc.c:96: Storage elem becomes implicitly only
+erc.c:98: Storage c->vals->next is kept in one path, but live in another.
+   erc.c:98: Storage c->vals->next becomes kept
+erc.c:102: Released storage c->vals reachable from parameter at return point
+   erc.c:100: Storage c->vals is released
+< checking dbase.c >
+dbase.c: (in function uncheckedHire)
+dbase.c:121: Fresh storage er not released before return
+   dbase.c:108: Fresh storage er allocated
+< checking drive.c >
+drive.c: (in function main)
+drive.c:49: Variable m_res name is not a macro variable (it is a local
+               variable), but matches the macro variable namespace prefix "m_"
+drive.c:65: Variable m_res name is not a macro variable (it is a local
+               variable), but matches the macro variable namespace prefix "m_"
+drive.c:83: Variable m_res name is not a macro variable (it is a local
+               variable), but matches the macro variable namespace prefix "m_"
+drive.c:120: Variable m_res name is not a macro variable (it is a local
+                variable), but matches the macro variable namespace prefix "m_"
+drive.c:124: Variable m_res name is not a macro variable (it is a local
+                variable), but matches the macro variable namespace prefix "m_"
+drive.c:135: Variable m_res name is not a macro variable (it is a local
+                variable), but matches the macro variable namespace prefix "m_"
+drive.c:140: Fresh storage em1 not released before assignment:
+                em1 = empset_create()
+   drive.c:35: Fresh storage em1 allocated
+drive.c:146: Fresh storage em2 not released before assignment:
+                em2 = empset_create()
+   drive.c:74: Fresh storage em2 allocated
+drive.c:147: Fresh storage em3 not released before assignment:
+                em3 = empset_disjointUnion(em2, em1)
+   drive.c:87: Fresh storage em3 allocated
+drive.c:159: Variable m_res name is not a macro variable (it is a local
+                variable), but matches the macro variable namespace prefix "m_"
+drive.c:163: Fresh storage em1 not released before return
+   drive.c:140: Fresh storage em1 allocated
+drive.c:163: Fresh storage em2 not released before return
+   drive.c:146: Fresh storage em2 allocated
+drive.c:163: Fresh storage em3 not released before return
+   drive.c:147: Fresh storage em3 allocated
+< checking macros bool.h >
+< global checks >
+
+Finished LCLint checking --- 28 code errors found, as expected
+
+< reading spec employee.lcl >
+< reading spec eref.lcl >
+< reading spec empset.lcl >
+< reading spec ereftab.lcl >
+< reading spec erc.lcl >
+< reading spec dbase.lcl >
+< preprocessing >
+< checking employee.c >
+< checking eref.c >
+< checking empset.c >
+< checking ereftab.c >
+< checking erc.c >
+< checking dbase.c >
+< checking drive.c >
+< checking macros bool.h >
+< global checks >
+
+Finished LCLint checking --- no code errors found
index 027b8c5ffa3024c737f6e7ee3966fbe814030ca2..4db36667706ba65cc99ece177444174ddfd5458c 100644 (file)
@@ -1,3 +1,145 @@
 
-employee.lcl:2: Cannot find standard import file: stdio.lcs
-*** Cannot continue.
+
+Error Type                Reported  Suppressed
+===================       ========  =========
+usedef                       0           1
+exporttype                   0           3
+compdef                      0           1
+modfilesys                   0          25
+fcnpost                      0          63
+fcnconstraint                0           9
+formalarray                  0          17
+                          ========  =========
+Total                        0         119
+
+Finished LCLint checking --- no code errors found
+
+eref.c: (in function eref_alloc)
+eref.c:36: Called procedure printf may access global stdout
+eref.c:36: Undocumented modification of *stdout possible from call to printf:
+              printf("Malloc returned null in eref_alloc\n")
+eref.c:36: Return value (type int) ignored: printf("Malloc r...
+eref.c:46: Called procedure printf may access global stdout
+eref.c:46: Undocumented modification of *stdout possible from call to printf:
+              printf("Malloc returned null in eref_alloc\n")
+eref.c:46: Return value (type int) ignored: printf("Malloc r...
+eref.c: (in function eref_initMod)
+eref.c:82: Called procedure printf may access global stdout
+eref.c:82: Undocumented modification of *stdout possible from call to printf:
+              printf("Malloc returned null in eref_initMod\n")
+eref.c:82: Return value (type int) ignored: printf("Malloc r...
+eref.c:90: Called procedure printf may access global stdout
+eref.c:90: Undocumented modification of *stdout possible from call to printf:
+              printf("Malloc returned null in eref_initMod\n")
+eref.c:90: Return value (type int) ignored: printf("Malloc r...
+erc.c: (in function int_toSize)
+erc.c:11: Undocumented use of global stderr
+erc.c:11: Undocumented modification of *stderr possible from call to fprintf:
+             fprintf(stderr, "Error: int_toSize failure: %d", x)
+erc.c:11: Return value (type int) ignored: fprintf(stderr, ...
+erc.c: (in function erc_create)
+erc.c:28: Called procedure printf may access global stdout
+erc.c:28: Undocumented modification of *stdout possible from call to printf:
+             printf("Malloc returned null in erc_create\n")
+erc.c:28: Return value (type int) ignored: printf("Malloc r...
+erc.c: (in function erc_insert)
+erc.c:80: Called procedure printf may access global stdout
+erc.c:80: Undocumented modification of *stdout possible from call to printf:
+             printf("Malloc returned null in erc_insert\n")
+erc.c:80: Return value (type int) ignored: printf("Malloc r...
+erc.c: (in function erc_sprint)
+erc.c:145: Called procedure printf may access global stdout
+erc.c:145: Undocumented modification of *stdout possible from call to printf:
+              printf("Malloc returned null in erc_sprint\n")
+erc.c:145: Return value (type int) ignored: printf("Malloc r...
+dbase.c: (in function db_print)
+dbase.c:307: Return value (type int) ignored: printf("Employee...
+dbase.c:312: Return value (type int) ignored: printf("%s", pri...
+drive.c: (in function main)
+drive.c:31: Called procedure printf may access global stdout
+drive.c:31: Undocumented modification of *stdout possible from call to printf:
+    printf("FormatPos: Wrong number of arguments. Given %d needs 0.\n", argc -
+    1)
+drive.c:31: Return value (type int) ignored: printf("FormatPo...
+drive.c:41: Called procedure printf may access global stdout
+drive.c:41: Undocumented modification of *stdout possible from call to printf:
+               printf("Size should be 0.\n")
+drive.c:41: Return value (type int) ignored: printf("Size sho...
+drive.c:57: Called procedure printf may access global stdout
+drive.c:57: Undocumented modification of *stdout possible from call to printf:
+               printf("Size should be 500.\n")
+drive.c:57: Return value (type int) ignored: printf("Size sho...
+drive.c:73: Called procedure printf may access global stdout
+drive.c:73: Undocumented modification of *stdout possible from call to printf:
+               printf("Size should be 250.\n")
+drive.c:73: Return value (type int) ignored: printf("Size sho...
+drive.c:93: Called procedure printf may access global stdout
+drive.c:93: Undocumented modification of *stdout possible from call to printf:
+               printf("Size should be 350.\n")
+drive.c:93: Return value (type int) ignored: printf("Size sho...
+drive.c:100: Called procedure printf may access global stdout
+drive.c:100: Undocumented modification of *stdout possible from call to printf:
+                printf("Size should be 350.\n")
+drive.c:100: Return value (type int) ignored: printf("Size sho...
+drive.c:103: Called procedure printf may access global stdout
+drive.c:103: Undocumented modification of *stdout possible from call to printf:
+                printf("Print two different employees:\n")
+drive.c:103: Return value (type int) ignored: printf("Print tw...
+drive.c:109: Called procedure printf may access global stdout
+drive.c:109: Undocumented modification of *stdout possible from call to printf:
+                printf("%s\n", &(na[0]))
+drive.c:109: Return value (type int) ignored: printf("%s\n", &...
+drive.c:151: Called procedure printf may access global stdout
+drive.c:151: Undocumented modification of *stdout possible from call to printf:
+    printf("Should print true: %s\n", bool_unparse(status == DBS_DUPLERR))
+drive.c:151: Return value (type int) ignored: printf("Should p...
+drive.c:154: Called procedure printf may access global stdout
+drive.c:154: Undocumented modification of *stdout possible from call to printf:
+                printf("Employees 0 - 19\n")
+drive.c:154: Return value (type int) ignored: printf("Employee...
+drive.c:155: Called procedure db_print may access global stdout
+drive.c:155: Undocumented modification of *stdout possible from call to
+                db_print: db_print()
+drive.c:158: Called procedure printf may access global stdout
+drive.c:158: Undocumented modification of *stdout possible from call to printf:
+                printf("Employees 0 - 16, 18 - 19\n")
+drive.c:158: Return value (type int) ignored: printf("Employee...
+drive.c:159: Called procedure db_print may access global stdout
+drive.c:159: Undocumented modification of *stdout possible from call to
+                db_print: db_print()
+drive.c:164: Called procedure printf may access global stdout
+drive.c:164: Undocumented modification of *stdout possible from call to printf:
+                printf("Should get two females: %d\n%s\n", i, sprintResult)
+drive.c:164: Return value (type int) ignored: printf("Should g...
+drive.c:174: Called procedure printf may access global stdout
+drive.c:174: Undocumented modification of *stdout possible from call to printf:
+    printf("Should get two females and ten males: %d\n%s\n", i, sprintResult)
+drive.c:174: Return value (type int) ignored: printf("Should g...
+drive.c:180: Called procedure printf may access global stdout
+drive.c:180: Undocumented modification of *stdout possible from call to printf:
+                printf("Should get two females: %d\n%s\n", i, sprintResult)
+drive.c:180: Return value (type int) ignored: printf("Should g...
+drive.c:184: Called procedure printf may access global stdout
+drive.c:184: Undocumented modification of *stdout possible from call to printf:
+                printf("Should get 18 employees\n")
+drive.c:184: Return value (type int) ignored: printf("Should g...
+drive.c:185: Called procedure db_print may access global stdout
+drive.c:185: Undocumented modification of *stdout possible from call to
+                db_print: db_print()
+
+Error Type                Reported  Suppressed
+===================       ========  =========
+usedef                       0           1
+exporttype                   0           3
+globs                       26           0
+retvalint                   25           0
+compdef                      0           1
+mods                        26           0
+modfilesys                   0          25
+fcnpost                      0          63
+fcnconstraint                0           9
+formalarray                  0          17
+                          ========  =========
+Total                       77         119
+
+Finished LCLint checking --- 77 code errors found, as expected
diff --git a/test/for.expect b/test/for.expect
new file mode 100644 (file)
index 0000000..22aa76a
--- /dev/null
@@ -0,0 +1,8 @@
+
+for.c: (in function f)
+for.c:13:5: Unresolved constraint:
+    Lclint is unable to resolve Requires: : (i @ for.c:13:7 )   <=  ( 10 ) 
+    needed to satisfy Requires: : MAXSET ((t @ for.c:13:5 ) )  >=  (i @
+    for.c:13:7 ) 
+
+Finished LCLint checking --- 1 code error found
diff --git a/test/globalbufferannotation.expect b/test/globalbufferannotation.expect
new file mode 100644 (file)
index 0000000..feff35f
--- /dev/null
@@ -0,0 +1,2 @@
+
+Finished LCLint checking --- no code errors found
index f47e614d813258ab8548d76ec6d88abb0215b366..b7e0e5215bfa5677fdd7407f2ce512fb42d94a36 100644 (file)
@@ -82,6 +82,8 @@ Finished LCLint checking --- no code processed
    ansilimits                  
    ansireserved                
    ansireservedinternal        
+   arrayread                   
+   arraywrite                  
    assignexpose                
    badflag                     
    bitwisesigned               
@@ -92,6 +94,7 @@ Finished LCLint checking --- no code processed
    booltrue                    
    booltype                    
    branchstate                 
+   bufferoverflow              
    casebreak                   
    castexpose                  
    castfcnptr                  
@@ -162,8 +165,10 @@ Finished LCLint checking --- no code processed
    externalprefix              
    externalprefixexclude       
    f                           
+   fcnconstraint               
    fcnderef                    
    fcnmacros                   
+   fcnpost                     
    fcnuse                      
    fielduse                    
    filestaticprefix            
@@ -312,6 +317,8 @@ Finished LCLint checking --- no code processed
    nullptrarith                
    nullret                     
    nullstate                   
+   nullterminated              
+   nullterminated              
    numenummembers              
    numliteral                  
    numstructfields             
@@ -885,6 +892,13 @@ includenest --- set maximum number of nested #include files
 ansilimits --- check for violations of standard limits (controlnestdepth,
 stringliterallen, includenest, numstructfields, numenummembers)
 null --- misuses of null pointer
+nullterminated --- misuse of nullterminated allocation
+bufferoverflow --- possible buffer overflow
+arrayread --- possible out of bounds read
+arraywrite --- possible buffer overflow from an out of bounds write
+fcnpost --- Function has the post condition
+fcnconstraint --- unresolved constraint
+nullterminated --- misuse of nullterminated allocation
 nullderef --- possible dereferencce of null pointer
 fcnderef --- dereferencce of a function type
 nullpass --- possibly null pointer passed as formal with no null annotation
index b7e0e5215bfa5677fdd7407f2ce512fb42d94a36..a385182877c19eee33469cd5cc8ddbe7b59f0dd3 100644 (file)
@@ -114,6 +114,7 @@ Finished LCLint checking --- no code processed
    constmacros                 
    constprefix                 
    constprefixexclude          
+   constraintlocation          
    constuse                    
    continuecomment             
    controlnestdepth            
@@ -898,6 +899,7 @@ arrayread --- possible out of bounds read
 arraywrite --- possible buffer overflow from an out of bounds write
 fcnpost --- Function has the post condition
 fcnconstraint --- unresolved constraint
+constraintlocation --- display full c expression for every constraint generated
 nullterminated --- misuse of nullterminated allocation
 nullderef --- possible dereferencce of null pointer
 fcnderef --- dereferencce of a function type
index eed7b168e38a1b6e8a1eedc8655142b880747d32..322718b53edec2558fd0dcfcff120962162b36bf 100644 (file)
@@ -3,7 +3,7 @@ Finished LCLint checking --- no code errors found
 /a/apollo.cs.Virginia.EDU/af9/drl7x/re/LCLintDev/test/maxset
 
 maxsetnoannotations.c: (in function noancopy)
-maxsetnoannotations.c:5:2: Unresolved constraint:
+maxsetnoannotations.c:4:1: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXSET ((a @ maxsetnoannotations.c:4
     :9 ) )  >=  MAXREAD ((b @ maxsetnoannotations.c:4:11 ) ) needed to satisfy
     Requires: : MAXSET ((a @ maxsetnoannotations.c:4:9 ) )  >=  MAXREAD ((b @
index eed7b168e38a1b6e8a1eedc8655142b880747d32..322718b53edec2558fd0dcfcff120962162b36bf 100644 (file)
@@ -3,7 +3,7 @@ Finished LCLint checking --- no code errors found
 /a/apollo.cs.Virginia.EDU/af9/drl7x/re/LCLintDev/test/maxset
 
 maxsetnoannotations.c: (in function noancopy)
-maxsetnoannotations.c:5:2: Unresolved constraint:
+maxsetnoannotations.c:4:1: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXSET ((a @ maxsetnoannotations.c:4
     :9 ) )  >=  MAXREAD ((b @ maxsetnoannotations.c:4:11 ) ) needed to satisfy
     Requires: : MAXSET ((a @ maxsetnoannotations.c:4:9 ) )  >=  MAXREAD ((b @
index 08298af5a157024e22533dac7cc39affbb41bbb9..de9c8e8b18b06ad18bb99b9424411b8927848a4a 100644 (file)
@@ -60,7 +60,7 @@
 2 y17|17&
 2 y18|18&
 -2 ?!
-0 s2|&
+0 a2|&
 0 s3|&
 0 s4|&
 0 s5|&
 3 f1 (20|@5|4@0@7&#,20|$#,63|$#,)!
 3 f567 (20|@5|4@0@7&#,20|$#,63|$#,)!
 3 C0.1/23|!
-3 f0 (23|@5|4@0@9&#,23|$#,)!
-3 f1 (23|@5|4@0@9&#,23|$#,)!
-3 f574 (23|@5|4@0@9&#,23|$#,)!
-3 f0 (23|@5|4@0@9&#,23|$#,63|$#,)!
-3 f1 (23|@5|4@0@9&#,23|$#,63|$#,)!
-3 f574 (23|@5|4@0@9&#,23|$#,63|$#,)!
-3 f0 (23|@5|4@0@9&#,23|$#,)!
-3 f1 (23|@5|4@0@9&#,23|$#,)!
-3 f574 (23|@5|4@0@9&#,23|$#,)!
-3 f0 (23|@5|4@0@9&#,23|$#,5|$#,)!
-3 f1 (23|@5|4@0@9&#,23|$#,5|$#,)!
-3 f574 (23|@5|4@0@9&#,23|$#,5|$#,)!
+3 f0 (23|4@0@9&#,23|$#,)!
+3 f1 (23|4@0@9&#,23|$#,)!
+3 f574 (23|4@0@9&#,23|$#,)!
+3 f0 (23|4@0@9&#,23|$#,63|$#,)!
+3 f1 (23|4@0@9&#,23|$#,63|$#,)!
+3 f574 (23|4@0@9&#,23|$#,63|$#,)!
+3 f0 (23|4@0@9&#,23|$#,)!
+3 f1 (23|4@0@9&#,23|$#,)!
+3 f574 (23|4@0@9&#,23|$#,)!
+3 f0 (23|4@0@9&#,23|$#,5|$#,)!
+3 f1 (23|4@0@9&#,23|$#,5|$#,)!
+3 f574 (23|4@0@9&#,23|$#,5|$#,)!
 3 f0 (20|$#,20|$#,63|$#,)!
 3 f5 (20|$#,20|$#,63|$#,)!
 3 f0 (23|$#,23|$#,)!
 3 f0 (20|$#,5|$#,63|$#,)!
 3 f19 (20|$#,5|$#,63|$#,)!
 3 f20 (20|$#,5|$#,63|$#,)!
-3 f0 (23|@5|$#,263|$#,)!
-3 f19 (23|@5|$#,263|$#,)!
-3 f23 (23|@5|$#,263|$#,)!
+3 f0 (23|$#,263|$#,)!
+3 f19 (23|$#,263|$#,)!
+3 f23 (23|$#,263|$#,)!
 3 f0 (23|$#,23|$#,)!
 3 f63 (23|$#,23|$#,)!
 3 f0 (23|@5|$#,23|$#,)!
 0 a1|&
 0 s14|&
 ;;tistable
+2
 0
 0,17
 17
 *0 (Datatype)
 0@+@=@0@7@0@0@67#mbstate_t
 0@+@+@0@7@0@0@654#mnull
-2@-@-@0@0@0@0@2#lltX_bool
+2@+@-@0@0@0@0@2#lltX_bool
 13@-@-@0@0@0@0@59#__SIZE_TYPE__
 13@-@-@0@0@0@0@60#__PTRDIFF_TYPE__
 13@-@-@0@0@0@0@61#__WCHAR_TYPE__
 372@-@-@0@0@0@0@374#ldiv_t
 *1 (Constant)
 0@i0@0@6#NULL
-2$#NDEBUG
 2@i1@0@0#TRUE
+2$#NDEBUG
 2@i0@0@6#FALSE
 3$#UCHAR_MAX#UCHAR_MIN
 4$#CHAR_MAX#CHAR_MIN#SCHAR_MAX#SCHAR_MIN
 423$@0@s3,g125@0@0@1@s3,tg125$@0#vwprintf
 388$@0@s3@1@s3,tp1$@0#fputws
 434$@1@@1@s0$@0#wcscmp#wcscoll
-501@6@0@1@2@0@1@g124@0@0,g113@0@0@1@g113,tg124$@0#wscanf
 499@6@0@1@1@0@1@g125@0@0,g113@0@0@1@g113,tg125$@0#wprintf
+501@6@0@1@2@0@1@g124@0@0,g113@0@0@1@g113,tg124$@0#wscanf
 265$@0@s3,g113@0@0@1@s3,tp1,g113$@0#fputc#ungetc
 276$@0@s3@1@s3,tp1$@0#putc
 364$@1@@1@s0$@0#abs
 203@6@0@5@0@0$$@0#raise
-213$@0@s3,g113@0@0@1@s3,g113$@0#remove
 280$@1@g125@0@0,s3@1@s3,tg125$@0#puts
+213$@0@s3,g113@0@0@1@s3,g113$@0#remove
 309$@1@@1@s0$@0#atoi
 349$@0@s3@1@s3$@0#system
 483$@1@@1@s0$@0#wctob
 329@4@5@1@0@0@1@@1@s0@2@0@0#malloc
 262@6@5@1@0@0@0@s3,g113@0@0@1@s3,tp0,tp2,g113$@0#fgets
 122@6@5@1@0@0@0@s1,g113@0@0@1@s1,g113@19@3@0#setlocale
+602@6@5@1@0@0@1@@1@s0@19@2@0#strchr
 607@6@5@1@0@0@1@@1@s0@19@2@0#strpbrk
-602@6@5@1@0@0@1@@1@s0@19@2@0#strchr#strrchr
+610@6@5@1@0@0@1@@1@s0@19@2@0#strrchr
 618@6@5@1@0@0@0@s1,g113@0@0@1@tp0,s1,g113@19@2@0#strtok
 615@6@5@1@0@0@1@@1@s0@19@2@0#strstr
 625$@1@@1@s0@19@3@0#strerror
 622$@0@@1@tp0$@0#memset
 573$@0@@1@tp0$@0#memmove
 570$@0@@1@tp0$@0#memcpy
-586$@0@@1@tp0$@0#strncat
-580$@0@@1@tp0$@0#strncpy
-583$@0@@1@tp0$@0#strcat#strcpy
+586$@0@@1@tp0@3@0@0#strncat
+580$@0@@1@tp0@3@0@0#strncpy
+583$@0@@1@tp0@3@0@0#strcat#strcpy
 451$@0@@1@tp0$@0#wcsncat#wcsncpy
 429$@0@@1@tp0$@0#wcscat#wcscpy
 516$@1@@1@s0$@0#iswctype
 630@442#@tm
 118@119#@lconv
 ;; Modules access
-ansi#8@
-null6#10@
+lltX_bool#1@
+types#1@
+ansi#9@
+null6#11@
 ;;End
diff --git a/test/simplebufferConstraintTests.expect b/test/simplebufferConstraintTests.expect
new file mode 100644 (file)
index 0000000..0839646
--- /dev/null
@@ -0,0 +1,27 @@
+
+m.c: (in function t)
+m.c:9:1: Index of possibly null pointer f: f
+   m.c:8:5: Storage f may become null
+sizeof.c: (in function f)
+sizeof.c:17:1: Unresolved constraint:
+    Lclint is unable to resolve Requires: :
+    ( 2 )   >=  ( 3 )  needed to satisfy Requires: : MAXSET ((x @ sizeof.c:17:1
+    ) )  >=  ( 3 ) 
+test3.c:2:6: Function t defined more than once
+   m.c:11:1: Previous definition of t
+test3.c: (in function t)
+test3.c:9:3: Unresolved constraint:
+    Lclint is unable to resolve Requires: :
+    ( 99 )   >=  ( 101 )  needed to satisfy Requires: : MAXSET ((g @
+    test3.c:9:3 ) )  >=  ( 101 ) 
+test7.c:2:6: Function t defined more than once
+   m.c:11:1: Previous definition of t
+test7.c: (in function t)
+test7.c:6:3: Unresolved constraint:
+    Lclint is unable to resolve Requires: : MAXSET ((g @ test7.c:4:3 ) )  >=  (
+    4 )  needed to satisfy Requires: : MAXSET ((g @ test7.c:6:3 ) )  >=  ( 2 ) 
+test7.c:8:3: Unresolved constraint:
+    Lclint is unable to resolve Requires: : MAXSET ((j @ test7.c:8:3 ) )  >=  (
+    0 )  needed to satisfy Requires: : MAXSET ((j @ test7.c:8:3 ) )  >=  ( 0 ) 
+
+Finished LCLint checking --- 7 code errors found
index ab8731098a8a0324045e503705b4b8d4ce2db7ad..e9969c8389beef2984179cc98914961c39c7250a 100644 (file)
@@ -1,6 +1,6 @@
 
 sizeof.c: (in function main)
-sizeof.c:9:2: Unresolved constraint:
+sizeof.c:6:2: Unresolved constraint:
     Lclint is unable to resolve Requires: :
     ( 2 )   >=  ( 3 )  needed to satisfy Requires: : MAXSET ((x @ sizeof.c:6:2
     ) )  >=  ( 3 ) 
index ab8731098a8a0324045e503705b4b8d4ce2db7ad..e9969c8389beef2984179cc98914961c39c7250a 100644 (file)
@@ -1,6 +1,6 @@
 
 sizeof.c: (in function main)
-sizeof.c:9:2: Unresolved constraint:
+sizeof.c:6:2: Unresolved constraint:
     Lclint is unable to resolve Requires: :
     ( 2 )   >=  ( 3 )  needed to satisfy Requires: : MAXSET ((x @ sizeof.c:6:2
     ) )  >=  ( 3 ) 
index 64e412dbaa2bead1aa0d096d6de6364ff9e6e7ee..1f957e85c8ab97cee223063c77204890b9e3fec8 100644 (file)
@@ -64,7 +64,6 @@ obviousloop.c: (in function f1b)
 obviousloop.c:59:3: Unreachable code: x = 12
 obviousloop.c: (in function f2)
 obviousloop.c:75:3: Unreachable code: x = 12
-constraintGeneration.c:470 [obviousloop.c:76:2]: >> strange for statement:for (<error>; <error>; <error>) { x++ }, ignoring it
 
 Finished LCLint checking --- 4 code errors found, as expected
 
index 64e917bc2d6c09c68523451bf6043e0974cb0dcb..8e1a336a920d9665466d0a979dbc276ed80fd315 100644 (file)
@@ -60,7 +60,7 @@
 2 y17|17&
 2 y18|18&
 -2 ?!
-0 s1|&
+0 a1|&
 0 s2|&
 0 s3|&
 0 s4|&
 3 f1 (20|@5|4@0@7&#,20|$#,63|$#,)!
 3 f567 (20|@5|4@0@7&#,20|$#,63|$#,)!
 3 C0.1/23|!
-3 f0 (23|@5|4@0@9&#,23|$#,)!
-3 f1 (23|@5|4@0@9&#,23|$#,)!
-3 f574 (23|@5|4@0@9&#,23|$#,)!
-3 f0 (23|@5|4@0@9&#,23|$#,63|$#,)!
-3 f1 (23|@5|4@0@9&#,23|$#,63|$#,)!
-3 f574 (23|@5|4@0@9&#,23|$#,63|$#,)!
-3 f0 (23|@5|4@0@9&#,23|$#,)!
-3 f1 (23|@5|4@0@9&#,23|$#,)!
-3 f574 (23|@5|4@0@9&#,23|$#,)!
-3 f0 (23|@5|4@0@9&#,23|$#,5|$#,)!
-3 f1 (23|@5|4@0@9&#,23|$#,5|$#,)!
-3 f574 (23|@5|4@0@9&#,23|$#,5|$#,)!
+3 f0 (23|4@0@9&#,23|$#,)!
+3 f1 (23|4@0@9&#,23|$#,)!
+3 f574 (23|4@0@9&#,23|$#,)!
+3 f0 (23|4@0@9&#,23|$#,63|$#,)!
+3 f1 (23|4@0@9&#,23|$#,63|$#,)!
+3 f574 (23|4@0@9&#,23|$#,63|$#,)!
+3 f0 (23|4@0@9&#,23|$#,)!
+3 f1 (23|4@0@9&#,23|$#,)!
+3 f574 (23|4@0@9&#,23|$#,)!
+3 f0 (23|4@0@9&#,23|$#,5|$#,)!
+3 f1 (23|4@0@9&#,23|$#,5|$#,)!
+3 f574 (23|4@0@9&#,23|$#,5|$#,)!
 3 f0 (20|$#,20|$#,63|$#,)!
 3 f5 (20|$#,20|$#,63|$#,)!
 3 f0 (23|$#,23|$#,)!
 3 f0 (20|$#,5|$#,63|$#,)!
 3 f19 (20|$#,5|$#,63|$#,)!
 3 f20 (20|$#,5|$#,63|$#,)!
-3 f0 (23|@5|$#,263|$#,)!
-3 f19 (23|@5|$#,263|$#,)!
-3 f23 (23|@5|$#,263|$#,)!
+3 f0 (23|$#,263|$#,)!
+3 f19 (23|$#,263|$#,)!
+3 f23 (23|$#,263|$#,)!
 3 f0 (23|$#,23|$#,)!
 3 f63 (23|$#,23|$#,)!
 3 f0 (23|@5|$#,23|$#,)!
 3 f5 (!.,)!
 3 f655 (!.,)!
 ;;tistable
+1
 0
 0,16
 16
 ;;symTable
 *0 (Datatype)
 0@+@=@0@7@0@0@67#mbstate_t
-2@-@-@0@0@0@0@2#lltX_bool
+2@+@-@0@0@0@0@2#lltX_bool
 13@-@-@0@0@0@0@59#__SIZE_TYPE__
 13@-@-@0@0@0@0@60#__PTRDIFF_TYPE__
 13@-@-@0@0@0@0@61#__WCHAR_TYPE__
 276$@0@s3@1@s3,tp1$@0#putc
 364$@1@@1@s0$@0#abs
 203@6@0@5@0@0$$@0#raise
-213$@0@s3,g112@0@0@1@s3,g112$@0#remove
 280$@1@g124@0@0,s3@1@s3,tg124$@0#puts
+213$@0@s3,g112@0@0@1@s3,g112$@0#remove
 309$@1@@1@s0$@0#atoi
 349$@0@s3@1@s3$@0#system
 483$@1@@1@s0$@0#wctob
 329@4@5@1@0@0@1@@1@s0@2@0@0#malloc
 262@6@5@1@0@0@0@s3,g112@0@0@1@s3,tp0,tp2,g112$@0#fgets
 122@6@5@1@0@0@0@s1,g112@0@0@1@s1,g112@19@3@0#setlocale
+602@6@5@1@0@0@1@@1@s0@19@2@0#strchr
 607@6@5@1@0@0@1@@1@s0@19@2@0#strpbrk
-602@6@5@1@0@0@1@@1@s0@19@2@0#strchr#strrchr
+610@6@5@1@0@0@1@@1@s0@19@2@0#strrchr
 618@6@5@1@0@0@0@s1,g112@0@0@1@tp0,s1,g112@19@2@0#strtok
 615@6@5@1@0@0@1@@1@s0@19@2@0#strstr
 625$@1@@1@s0@19@3@0#strerror
 622$@0@@1@tp0$@0#memset
 573$@0@@1@tp0$@0#memmove
 570$@0@@1@tp0$@0#memcpy
-586$@0@@1@tp0$@0#strncat
-580$@0@@1@tp0$@0#strncpy
-583$@0@@1@tp0$@0#strcat#strcpy
+586$@0@@1@tp0@3@0@0#strncat
+580$@0@@1@tp0@3@0@0#strncpy
+583$@0@@1@tp0@3@0@0#strcat#strcpy
 451$@0@@1@tp0$@0#wcsncat#wcsncpy
 429$@0@@1@tp0$@0#wcscat#wcscpy
 516$@1@@1@s0$@0#iswctype
 630@442#@tm
 118@119#@lconv
 ;; Modules access
-ansi#8@
+lltX_bool#1@
+types#1@
+ansi#9@
 ;;End
This page took 0.104851 seconds and 5 git commands to generate.