projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2dbf5b6
)
Check whether the declaration is not NULL before issuing a warning about using a...
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 20 Aug 2008 12:40:02 +0000
(12:40 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 20 Aug 2008 12:40:02 +0000
(12:40 +0000)
[r21277]
ast2firm.c
patch
|
blob
|
history
diff --git
a/ast2firm.c
b/ast2firm.c
index
7261ac8
..
ff134d8
100644
(file)
--- a/
ast2firm.c
+++ b/
ast2firm.c
@@
-96,9
+96,11
@@
ir_node *uninitialized_local_var(ir_graph *irg, ir_mode *mode, int pos)
{
const declaration_t *declaration = get_irg_loc_description(irg, pos);
- warningf(&declaration->source_position,
- "variable '%#T' might be used uninitialized",
- declaration->type, declaration->symbol);
+ if (declaration != NULL) {
+ warningf(&declaration->source_position,
+ "variable '%#T' might be used uninitialized",
+ declaration->type, declaration->symbol);
+ }
return new_r_Unknown(irg, mode);
}