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
kernel: fix a type bug handling err_cast()
[smatch.git]
/
validation
/
infinite-loop01.c
blob
521cfb4d4e39322e3d7dee76b3bfecdb4c8f8741
1
void
fnp
(
void
)
2
{
3
int
a
;
4
for
(;;)
5
a
+=
1
;
6
}
7
8
void
fnm
(
void
)
9
{
10
int
a
;
11
for
(;;)
12
a
-=
1
;
13
}
14
15
void
fna
(
void
)
16
{
17
int
a
;
18
for
(;;)
19
a
&=
1
;
20
}
21
22
void
fno
(
void
)
23
{
24
int
a
;
25
for
(;;)
26
a
|=
1
;
27
}
28
29
void
fnx
(
void
)
30
{
31
int
a
;
32
for
(;;)
33
a
^=
1
;
34
}
35
36
void
fnl
(
void
)
37
{
38
int
a
;
39
for
(;;)
40
a
<<=
1
;
41
}
42
43
void
fnr
(
void
)
44
{
45
int
a
;
46
for
(;;)
47
a
>>=
1
;
48
}
49
50
/*
51
* check-name: infinite loop 01
52
* check-command: sparse -Wno-decl $file
53
* check-timeout:
54
*/