]> andersk Git - splint.git/commitdiff
Added new tests.
authordrl7x <drl7x>
Mon, 15 Jan 2001 02:11:38 +0000 (02:11 +0000)
committerdrl7x <drl7x>
Mon, 15 Jan 2001 02:11:38 +0000 (02:11 +0000)
26 files changed:
test/Makefile
test/bufferTest.expect
test/db1.out
test/db1/employee.lh
test/db1/empset.lh
test/db1/erc.lh
test/db1/ereftab.lh
test/db2.out
test/db2/erc.lh
test/db3.out
test/db3/dbase.lh
test/db3/employee.lh
test/db3/empset.lh
test/db3/erc.lh
test/db3/eref.lh
test/db3/ereftab.lh
test/funcpointer.out
test/maxset.expect [new file with mode: 0644]
test/maxset.out [new file with mode: 0644]
test/null6.lcd
test/sizeoftest.expect
test/sizeoftest.out
test/strchr.expect [new file with mode: 0644]
test/strchr.out [new file with mode: 0644]
test/tests2.2a.out
test/tests2.5/newlint.lcd

index 6c7d3d89b58184f8b9b46921641048cd4b12da7a..b46bd6e5796a66b7e6897fe8ec4ecb79dd817a8e 100644 (file)
 .PHONY: sizeoftest
 .PHONY: bufferTest
 .PHONY: simplebufferConstraintTests
+.PHONY: maxset
+.PHONY: globalbufferannotation
+.PHONY: strchr
+.PHONY: for
 
 .SUFFIXES: .out .expect .c .lcl .h .lh .diff
 
@@ -38,7 +42,7 @@ LCLINTP = $(LCLINT)
 LCLINTRN = $(LCLINTP) -nof -hints -booltype "bool"
 LCLINTR = $(LCLINTRN) -exportlocal
 
-UNITTESTS = help abstptr abstract alias alttypes ansireserved argorder args blocks break cases cast charlit clauses commentchar compdestroy controldepth csyntax czechnames czechoslovaknames decl enum exports external fields flags funcpointer glob globals impabstract init inparam internal iter keep libs lintcomments list macros macrosef merge modifies modtest moduncon mongoincludes null sizeoftest bufferTest simplebufferConstraintTests observer oldstyle outglob outparam preds prefixes printflike rc refcounts release repexpose sharing slovaknames specclauses special stack staticarray strings structassign typequals ud ulstypes union unreachable unused tests2.2 tests2.2a tests2.4 tests2.5
+UNITTESTS = help sizeoftest bufferTest simplebufferConstraintTests globalbufferannotation maxset strchr for abstptr abstract alias alttypes ansireserved argorder args blocks break cases cast charlit clauses commentchar compdestroy controldepth csyntax czechnames czechoslovaknames decl enum exports external fields flags funcpointer glob globals impabstract init inparam internal iter keep libs lintcomments list macros macrosef merge modifies modtest moduncon mongoincludes null  observer oldstyle outglob outparam preds prefixes printflike rc refcounts release repexpose sharing slovaknames specclauses special stack staticarray strings structassign typequals ud ulstypes union unreachable unused tests2.2 tests2.2a tests2.4 tests2.5
 
 #UNITTEST = bufferTest
 
@@ -595,6 +599,26 @@ simplebufferConstraintTests:
        @cd simplebufferConstraintTests; \
        $(LCLINTR) +functionconstraint m.c  sizeof.c  test3.c  test7.c
 
+maxset:
+       @cd maxset; \
+       $(LCLINTR) -f .lclintrc -booltype "lltX_bool" maxsetannotations.c; \
+       pwd; \
+       echo $(LCLINTR); \
+       $(LCLINTR) -f .lclintrc -booltype "lltX_bool"  maxsetnoannotations.c
+
+globalbufferannotation:
+       @cd globalbufferannotation; \
+       $(LCLINTR) +functionconstraint globalvariable.c
+
+
+strchr:
+       @cd strchr; \
+       $(LCLINTR) -f .lclintrc -booltype "lltX_bool" strchr.c
+
+for:
+       @cd for; \
+       $(LCLINTR) -f .lclintrc -booltype "lltX_bool" for.c
+
 tests2.5:
        setenv LCLINT '$(LCLINTRN)'; cd tests2.5 ; $(MAKE) -e
 
index 82827d25c7f8c2b147af6908a3eea11bd50d3d3b..3fbcc7ae4fb74426a258c039fa33696de6db7ef1 100644 (file)
@@ -3,18 +3,18 @@ test4.c: (in function t)
 test4.c:6:3: Variable g used before definition
 test4.c:15:2: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXSET ((g @ test4.c:6:3 ) )  >=  (
-    100 )  needed to satisy Requires: : MAXSET ((g @ test4.c:6:3 ) )  >=  ( 100
-    ) 
+    100 )  needed to satisfy Requires: : MAXSET ((g @ test4.c:6:3 ) )  >=  (
+    100 
 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:
     Lclint is unable to resolve Requires: : MAXSET ((g @ test6.c:5:4 ) )  >=  (
-    1 )  needed to satisy Requires: : MAXSET ((g @ test6.c:6:3 ) )  >=  ( 0 ) 
+    1 )  needed to satisfy Requires: : MAXSET ((g @ test6.c:6:3 ) )  >=  ( 0 ) 
 test6.c:7:2: Unresolved constraint:
     Lclint is unable to resolve Requires: : MAXREAD ((g @ test6.c:5:4 ) )  >= 
-    ( 2 )  needed to satisy Requires: : MAXREAD ((g @ test6.c:6:10 ) )  >=  ( 1
-    ) 
+    ( 2 )  needed to satisfy Requires: : MAXREAD ((g @ test6.c:6:10 ) )  >=  (
+    
 
 Finished LCLint checking --- 6 code errors found
index 193992613a485b7895e8359b4d0db6a0e16323f1..c79007ffc7aa8f14c8056c24c59c80954b41d968 100644 (file)
@@ -1,689 +1,2 @@
-
-< 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          54
-fcnconstraint                0           5
-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         112
-
-Finished LCLint checking --- 331 code errors found, as expected
+dbase.lcl:2:1: Cannot find standard import file: stdio.lcs
+*** Cannot continue.
index e201551d5e51b4d2587927fdb663ee09e730cd18..e1fbc2638c4c0fc9bf64873c50ff8ad51a247149 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include "bool.h"
 # include "bool.h"
index 1104ded343572b3144a9121ebc0fb96b7a528edf..099660b0c071fe48cb7a0a9dbfeab5ed46e4a6f5 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include "bool.h"
 # include "employee.h"
index c3a3c948a30b1f3249dccacc28764bde7cb5f336..6395967d07728f02a5e2b8c392efb4e181e3deda 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include "bool.h"
 # include "eref.h"
index 5142bff35741c17eecdb5cef683f662e20625cbb..a43fcb7e5dcc448de1caa81c6676a48b3033b851 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include "bool.h"
 # include "employee.h"
index 9ad7275ab002df5defea079ba132cf40315f9cf1..64c29c19f775f9f3abe00e3de1e95998ec1ae073 100644 (file)
@@ -1,169 +1,4 @@
 
 < 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_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
+employee.lcl:2: Cannot find standard import file: stdio.lcs
+*** Cannot continue.
index 8105c2210cfb98bf94dbc8c14c898a48e10dcba4..9089a056cfcbee3d0962aec2fc4ab860c84b5c5b 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include "bool.h"
 # include "eref.h"
index e9a24c53b19d4080b97f856f4fd229aacefcbf3f..027b8c5ffa3024c737f6e7ee3966fbe814030ca2 100644 (file)
@@ -1,145 +1,3 @@
 
-
-Error Type                Reported  Suppressed
-===================       ========  =========
-usedef                       0           1
-exporttype                   0           3
-compdef                      0           1
-modfilesys                   0          25
-fcnpost                      0          53
-fcnconstraint                0           4
-formalarray                  0          17
-                          ========  =========
-Total                        0         104
-
-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          53
-fcnconstraint                0           4
-formalarray                  0          17
-                          ========  =========
-Total                       77         104
-
-Finished LCLint checking --- 77 code errors found, as expected
+employee.lcl:2: Cannot find standard import file: stdio.lcs
+*** Cannot continue.
index 0bfec4047ccf88396b66a1262ceeed1ccf810ba9..a54d63b2a40ecc7c9dbfe3583a58e92efddf78c8 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include <stdio.h>
 # include "bool.h"
index 54cd8f4d299355d120e35848c97e1cba58d6d9b6..b8dd981a5d838e897b4ebf3e1e2abd12059f53ff 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include <stdio.h>
 # include "bool.h"
index 4a7ba7bd396fc064deea14677b687a9b26fdb4f3..d5656bb21fe81e50bdbaa3d3326f6a86ebcb8ba0 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include "bool.h"
 # include "employee.h"
index d4011bc5d2d233e0edeab38f9f7e9b3e1917923a..8f67d93f98a0f9520d04660f67d0aea7c58a1088 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include "bool.h"
 # include "eref.h"
index 8d28611e6ae1eba3e8f9d43517ede7e5d4ecb4f9..e42cd164f462a98bdec92e124a0eec533a61389f 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include "bool.h"
 # include "employee.h"
index 50bcca2a157bb2c9f219b3012e150103ccf197ce..fffce7e67106965c2b5eb227794789af0280872c 100644 (file)
@@ -1,4 +1,4 @@
-/* Output from LCLint 2.5p */
+/* Output from LCLint 2.5q */
 
 # include "bool.h"
 # include "employee.h"
index 33be7836f2b44f302c2b1f4280316ddc2349bcc0..2b88b1d0fc2607cd38aad9cac05873b86c3f66b6 100644 (file)
@@ -28,5 +28,8 @@ funcpointer.c:48:10: Function (t6) called with 0 args, expects 2
 funcpointer.c:49:10: Function (t6) called with 1 args, expects 2
 funcpointer.c:50:11: Function (t6) called with 1 args, expects 2
 funcpointer.c:50:10: Function ((t6)(3)) called with 0 args, expects 1
+uentry.c:579 [funcpointer.c:54:2]: >> called uentry_getFcnPreconditions on nonfunction f2 t2
+uentry.c:583 [funcpointer.c:54:2]: >> called uentry_getFcnPreconditions on nonfunction f2 t2
+uentry.c:633 [funcpointer.c:54:2]: >> called uentry_getFcnPostconditions on nonfunction f2 t2
 
 Finished LCLint checking --- 18 code errors found, as expected
diff --git a/test/maxset.expect b/test/maxset.expect
new file mode 100644 (file)
index 0000000..eed7b16
--- /dev/null
@@ -0,0 +1,12 @@
+
+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:
+    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 @
+    maxsetnoannotations.c:4:11 ) )
+
+Finished LCLint checking --- 1 code error found
diff --git a/test/maxset.out b/test/maxset.out
new file mode 100644 (file)
index 0000000..eed7b16
--- /dev/null
@@ -0,0 +1,12 @@
+
+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:
+    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 @
+    maxsetnoannotations.c:4:11 ) )
+
+Finished LCLint checking --- 1 code error found
index 339dc5a5ff48903ddb7e7258b302ea7d4898f4e6..08298af5a157024e22533dac7cc39affbb41bbb9 100644 (file)
@@ -60,7 +60,7 @@
 2 y17|17&
 2 y18|18&
 -2 ?!
-0 a2|&
+0 s2|&
 0 s3|&
 0 s4|&
 0 s5|&
 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@i1@0@0#TRUE
 2$#NDEBUG
+2@i1@0@0#TRUE
 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
-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
+499@6@0@1@1@0@1@g125@0@0,g113@0@0@1@g113,tg125$@0#wprintf
 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
 344$@0@s1@1@s1$@0#atexit
 405$@1@@1@s0$@0#mbsinit
 278$@1@g125@0@0,s3@1@s3,tg125$@0#putchar
-271$@1@g124@0@0,s3@1@s3,tg124$@0#getchar
 321$@0@s1@1@s1$@0#rand
+271$@1@g124@0@0,s3@1@s3,tg124$@0#getchar
 317$@0@g113@0@0@1@tp1,g113$@0#strtol
 477$@0@@1@tp1$@0#wcstol
 371$@1@@1@s0$@0#labs
 630@442#@tm
 118@119#@lconv
 ;; Modules access
-lltX_bool#1@
-types#1@
-ansi#9@
-null6#11@
+ansi#8@
+null6#10@
 ;;End
index 535b163852510df51f485acd2215472168402ddb..ab8731098a8a0324045e503705b4b8d4ce2db7ad 100644 (file)
@@ -1,8 +1,8 @@
 
 sizeof.c: (in function main)
 sizeof.c:9:2: Unresolved constraint:
-    Lclint is unable to resolve Requires: : MAXSET ((x @ sizeof.c:6:2 ) )  >= 
-    ( 3 )  needed to satisfy Requires: : MAXSET ((x @ sizeof.c:6:2 ) )  >=  ( 3
-    ) 
+    Lclint is unable to resolve Requires: :
+    ( 2 )   >=  ( 3 )  needed to satisfy Requires: : MAXSET ((x @ sizeof.c:6:2
+    ) )  >=  ( 3 ) 
 
 Finished LCLint checking --- 1 code error found
index 535b163852510df51f485acd2215472168402ddb..ab8731098a8a0324045e503705b4b8d4ce2db7ad 100644 (file)
@@ -1,8 +1,8 @@
 
 sizeof.c: (in function main)
 sizeof.c:9:2: Unresolved constraint:
-    Lclint is unable to resolve Requires: : MAXSET ((x @ sizeof.c:6:2 ) )  >= 
-    ( 3 )  needed to satisfy Requires: : MAXSET ((x @ sizeof.c:6:2 ) )  >=  ( 3
-    ) 
+    Lclint is unable to resolve Requires: :
+    ( 2 )   >=  ( 3 )  needed to satisfy Requires: : MAXSET ((x @ sizeof.c:6:2
+    ) )  >=  ( 3 ) 
 
 Finished LCLint checking --- 1 code error found
diff --git a/test/strchr.expect b/test/strchr.expect
new file mode 100644 (file)
index 0000000..f54bbeb
--- /dev/null
@@ -0,0 +1,6 @@
+
+strchr.c: (in function func)
+strchr.c:6:4: Dereference of possibly null pointer c: *c
+   strchr.c:5:7: Storage c may become null
+
+Finished LCLint checking --- 1 code error found
diff --git a/test/strchr.out b/test/strchr.out
new file mode 100644 (file)
index 0000000..f54bbeb
--- /dev/null
@@ -0,0 +1,6 @@
+
+strchr.c: (in function func)
+strchr.c:6:4: Dereference of possibly null pointer c: *c
+   strchr.c:5:7: Storage c may become null
+
+Finished LCLint checking --- 1 code error found
index 1f957e85c8ab97cee223063c77204890b9e3fec8..64e412dbaa2bead1aa0d096d6de6364ff9e6e7ee 100644 (file)
@@ -64,6 +64,7 @@ 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 e95015ef528170532c58f31369ab808b6db04bce..64e917bc2d6c09c68523451bf6043e0974cb0dcb 100644 (file)
@@ -60,7 +60,7 @@
 2 y17|17&
 2 y18|18&
 -2 ?!
-0 a1|&
+0 s1|&
 0 s2|&
 0 s3|&
 0 s4|&
 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__
 372@-@-@0@0@0@0@374#ldiv_t
 *1 (Constant)
 0@i0@0@6#NULL
-2@i1@0@0#TRUE
 2$#NDEBUG
+2@i1@0@0#TRUE
 2@i0@0@6#FALSE
 3$#UCHAR_MAX#UCHAR_MIN
 4$#CHAR_MAX#CHAR_MIN#SCHAR_MAX#SCHAR_MIN
 630@442#@tm
 118@119#@lconv
 ;; Modules access
-lltX_bool#1@
-types#1@
-ansi#9@
+ansi#8@
 ;;End
This page took 0.290401 seconds and 5 git commands to generate.