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
generic_data: rename to match build_kernel_data.sh
[smatch.git]
/
validation
/
sm_loops4.c
blob
1b35b2131062ee39fbb3fbbde39a060da1e39791
1
#include
"check_debug.h"
2
3
char
*
some_func
(
void
);
4
5
int
x
,
y
;
6
int
i
;
7
void
func
(
void
)
8
{
9
char
*
p
;
10
char
*
p2
;
11
12
if
(
x
>
0
)
13
p
=
some_func
();
14
for
(
i
=
0
;
i
<
x
;
i
++)
15
*
p
=
'x'
;
16
*
p
=
'x'
;
17
if
(
y
>
0
)
18
p2
=
some_func
();
19
i
=
0
;
20
if
(
i
<
y
)
21
*
p2
=
'x'
;
22
}
23
/*
24
* check-name: smatch loops #4
25
* check-command: smatch -I.. sm_loops4.c
26
*
27
* check-output-start
28
sm_loops4.c:16 func() error: potentially dereferencing uninitialized 'p'.
29
* check-output-end
30
*/