]> andersk Git - splint.git/blobdiff - test/db1.expect
Fixed loading of rc files, warnrc and showscan.
[splint.git] / test / db1.expect
index 307db065ef206087fab17dc70449c85c5bc9830c..efc2832acfbd383fe33dd92bf4402d8231ddd38a 100644 (file)
@@ -1,18 +1,9 @@
+make -e clean
+make -e check
 
-< 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:
+employee.c:25: 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)
@@ -29,11 +20,9 @@ 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)
@@ -43,79 +32,65 @@ 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
+Finished checking --- 16 code warnings, 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.h:12: Declaration parameter has name: p_e
+employee.c:5: Definition parameter name e does not match name of corresponding
+                 parameter in declaration: p_e
+   employee.h:12: Previous declaration of p_e
 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
+employee.c:12: Undefined storage e->name corresponds to storage listed in
+                  defines clause
+employee.c:12: Body of if statement is not a block: return FALSE
+employee.c:15: 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:
+employee.c:25: 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
+employee.c:30: 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
+employee.c:30: 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: gender[2] = "?"
+employee.c:31: 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
+employee.c:31: 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
+employee.c:31: 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.c:34: Array fetch using non-integer, gender: gender[e.gen]
+employee.c:34: 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
+employee.h:14: 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
+employee.h:14: 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
@@ -172,16 +147,17 @@ 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:62: Implicitly only storage eref_Pool.conts (type employee *) 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 *
+eref.c:70: Implicitly only storage eref_Pool.status (type eref_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
@@ -190,8 +166,8 @@ 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.conts) contains 5 undefined fields when
+              call returns: ssNum, name, salary, gen, j
 eref.c:84: Global storage eref_Pool contains 1 undefined field when call
               returns: status
 eref.h: (in macro eref_free)
@@ -208,7 +184,8 @@ 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: Name _elem is in the implementation name space (any identifier
+            beginning with underscore)
 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
@@ -219,7 +196,7 @@ 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 (0)
+                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
@@ -257,9 +234,10 @@ 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 (0)
+                 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 (0)
+                 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
@@ -274,7 +252,6 @@ 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)
@@ -283,7 +260,6 @@ ereftab.c:34: Undocumented modification of t possible from call to
 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
@@ -306,17 +282,11 @@ 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
+erc.c:83: Implicitly only storage prev->next (type struct _elem *) not released
+             before assignment: prev->next = elem->next
+erc.c:84: 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)
@@ -351,8 +321,9 @@ 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: Only storage *it->next (type struct _elem *) derived from released
+             storage is not released (memory leak): it
 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()
@@ -566,7 +537,6 @@ dbase.c:272: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
 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()
@@ -588,8 +558,6 @@ 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
@@ -629,7 +597,6 @@ 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
 ===================       ========  =========
@@ -639,7 +606,9 @@ exitarg                      8           0
 unreachable                  1           0
 forempty                     1           0
 forblock                    11           0
-ifblock                     24           0
+ifblock                     22           0
+redecl                       0           7
+incondefs                    0           1
 usedef                       1           0
 noeffect                    11           0
 exporttype                   5           0
@@ -652,9 +621,10 @@ retvalother                  1           0
 retvalbool                  16           0
 macroparens                  4           0
 usereleased                  1           0
-compdef                      2           0
+compdef                      3           0
+compdestroy                  1           0
 mustfree                     3           0
-branchstate                  3           2
+branchstate                  2           1
 onlytrans                    1           0
 freshtrans                   3           0
 temptrans                    3           2
@@ -665,14 +635,15 @@ modfilesys                   0          25
 modnomods                    4           0
 moduncon                    20           0
 modunconnomods               1           0
-ansireserved                 9           0
+namechecks                  11           6
+protoparammatch              1           0
 nullret                      1           0
 nullstate                    1           0
 sizeoftype                   7           0
-formalarray                  0          17
+formalarray                  0          24
 type                         1           0
 enumindex                   24           0
-relaxtypes                  15           0
+enumint                     15           0
 matchanyintegral             2           0
 exportlocal                 15           0
 exportheader                 4           0
@@ -681,6 +652,6 @@ paramuse                     1           0
 typeuse                      1           0
 varuse                       4           0
                           ========  =========
-Total                      331          53
+Total                      333          73
 
-Finished LCLint checking --- 331 code errors found, as expected
+Finished checking --- 333 code warnings, as expected
This page took 0.061669 seconds and 4 git commands to generate.