repo.or.cz
/
splint-patched.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Some consistency changes to library & headers flags.
[splint-patched.git]
/
test
/
chararraylit.c
blob
057a42fb77598e9804dfac2a9d10781c4e91fa99
1
/*
2
** Character arrays can be initialized using string literals (without becoming observers).
3
*/
4
5
void
f
(
void
)
6
{
7
char
s0
[] =
"abc"
;
8
char
s1
[
3
] =
"abc"
;
/* warning about no room for nullterminator */
9
char
*
p
=
"abc"
;
10
11
*
s0
=
'b'
;
/* okay */
12
s1
[
1
] =
'd'
;
/* okay */
13
*
p
=
'c'
;
/* error */
14
}