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
function_hooks: update comment explaining various function hooks
[smatch.git]
/
validation
/
flex-array-sizeof.c
blob
05394e19a6b27529f7456ac2ceaa1bf9a7425726
1
struct
s
{
2
int
i
;
3
long
f
[];
4
};
5
6
static int
foo
(
struct
s
*
s
)
7
{
8
return sizeof
(*
s
);
9
}
10
11
/*
12
* check-name: flex-array-sizeof
13
* check-command: sparse -Wflexible-array-sizeof $file
14
*
15
* check-error-start
16
flex-array-sizeof.c:8:16: warning: using sizeof on a flexible structure
17
* check-error-end
18
*/