projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68bd88f
)
Correct off-by-one-token error in warning.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 16 Jun 2011 09:31:29 +0000
(11:31 +0200)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 16 Jun 2011 09:31:29 +0000
(11:31 +0200)
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
504cea8
..
4fa91c2
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-1754,12
+1754,13
@@
static initializer_t *parse_scalar_initializer(type_t *type,
{
/* there might be extra {} hierarchies */
int braces = 0;
- if (
next_if('{')
) {
+ if (
token.type == '{'
) {
if (warning.other)
warningf(HERE, "extra curly braces around scalar initializer");
do {
+ eat('{');
++braces;
- } while (
next_if('{')
);
+ } while (
token.type == '{'
);
}
expression_t *expression = parse_assignment_expression();