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
smatch_data/kernel.unreachable.ignore: add BUG(), WARN_ON() and others
[smatch.git]
/
validation
/
packed-deref0.c
blob
d48ad1ac7505538eeba674a948d58625922e98a7
1
#define __packed __attribute__((packed))
2
3
typedef
struct
{
4
__INT8_TYPE__ a
;
5
__INT16_TYPE__ b
;
6
__INT32_TYPE__ c
;
7
}
__packed obj_t
;
8
9
_Static_assert
(
sizeof
(
obj_t
) ==
7
,
"sizeof packed struct"
);
10
11
static void
foo
(
obj_t
*
ptr
,
int
val
)
12
{
13
ptr
->
c
=
val
;
14
}
15
16
static void
bar
(
obj_t o
)
17
{
18
foo
(&
o
,
0
);
19
}
20
21
/*
22
* check-name: packed-deref0
23
*/