repo.or.cz
/
smatch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Implied ranges. Part #2. Filters
[smatch.git]
/
validation
/
sm_compound_condition.c
blob
37318de48af6756bc685743d63e53e915a3ec009
1
struct
ture
{
2
int
a
;
3
};
4
5
struct
ture
*
a
;
6
struct
ture
*
b
;
7
8
void
func
(
void
)
9
{
10
if
(!
a
&& !(
a
=
returns_nonnull
()))
11
return
;
12
a
->
a
=
1
;
13
14
if
(
b
|| (
b
=
returns_nonnull
())) {
15
b
->
a
=
1
;
16
return
;
17
}
18
b
->
a
=
1
;
19
}
20
/*
21
* check-name: Compound Conditions
22
* check-command: smatch sm_compound_condition.c
23
*
24
* check-output-start
25
sm_compound_condition.c +18 func(10) error: dereferencing undefined: 'b'
26
* check-output-end
27
*/