File: db2.expect

package info (click to toggle)
splint 3.1.2.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 12,908 kB
  • ctags: 15,816
  • sloc: ansic: 150,306; yacc: 3,463; sh: 3,426; makefile: 2,217; lex: 412
file content (112 lines) | stat: -rw-r--r-- 5,979 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

employee.c: (in function employee_setName)
employee.c:17: Parameter 1 (e->name) to function strcpy is declared unique but
                  may be aliased externally by parameter 2 (na)
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:29: Storage eref_Pool.status becomes only
eref.c:45: Storage eref_Pool.conts reachable from global is only (should be
              unqualified)
   eref.c:19: 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 created
eref.c:84: Global storage *(eref_Pool.conts) contains 5 undefined fields when
              call returns: ssNum, name, 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 created
eref.c:84: Global storage eref_Pool contains 1 undefined field when call
              returns: status
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 created
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 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 created

Finished checking --- 15 code warnings, as expected

employee.c: (in function employee_setName)
employee.c:17: Parameter 1 (e->name) to function strcpy is declared unique but
                  may be aliased externally by parameter 2 (na)
eref.c: (in function eref_initMod)
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: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: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
empset.c: (in function empset_intersect)
empset.c:126: Fresh storage toDelete not released before return
   empset.c:112: Fresh storage toDelete created
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 (type struct _elem *) 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 (through alias c->vals)
erc.c:102: Released storage c->vals reachable from parameter at return point
   erc.c:100: Storage c->vals released
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 (type empset) not released before assignment:
                em1 = empset_create()
   drive.c:35: Fresh storage em1 created
drive.c:146: Fresh storage em2 (type empset) not released before assignment:
                em2 = empset_create()
   drive.c:74: Fresh storage em2 created
drive.c:147: Fresh storage em3 (type empset) not released before assignment:
                em3 = empset_disjointUnion(em2, em1)
   drive.c:87: Fresh storage em3 created
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 created
drive.c:163: Fresh storage em2 not released before return
   drive.c:146: Fresh storage em2 created
drive.c:163: Fresh storage em3 not released before return
   drive.c:147: Fresh storage em3 created

Finished checking --- 25 code warnings, as expected

Finished checking --- no warnings