aboutsummaryrefslogtreecommitdiff
path: root/mfd/drivers.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-11-02 12:46:40 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-11-02 12:46:40 +0000
commit002abd6de66451db160d58cbcb42090bb9356a7c (patch)
tree8feaf71cb64b106e3161bfed77d36ff58c1c8c18 /mfd/drivers.c
parent40dae974804e364d747254ba942597e3c00612c0 (diff)
downloadmailfromd-002abd6de66451db160d58cbcb42090bb9356a7c.tar.gz
mailfromd-002abd6de66451db160d58cbcb42090bb9356a7c.tar.bz2
Minor fix.
* mfd/drivers.c (mark_type_asgn): Mark variable as referenced if it is assigned a value. git-svn-id: file:///svnroot/mailfromd/trunk@1719 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'mfd/drivers.c')
-rw-r--r--mfd/drivers.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mfd/drivers.c b/mfd/drivers.c
index c3ed92b2..5ecaad07 100644
--- a/mfd/drivers.c
+++ b/mfd/drivers.c
@@ -1168,9 +1168,13 @@ print_type_asgn(NODE *node, int level)
void
mark_type_asgn(NODE *node)
{
- /* FIXME: That's not quite right. The node should be marked
- only if var is referenced or volatile, but determining this
- would probably require an extra pass. */
+ /* FIXME: This is overly conservative. First of all, `referenced'
+ does not mean `used', so this can create useless assignments,
+ even if the variable in question is not referenced elsewhere: */
+ node->v.asgn.var->flags |= VAR_REFERENCED;
+ /* Secondly, the node should be marked only if var is referenced
+ or volatile, but determining this would probably require an
+ extra pass. */
mark(node->v.asgn.node);
}

Return to:

Send suggestions and report system problems to the System administrator.