From 32215b12965e558a27da915f67569d711a86b9bf Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 5 Jun 2002 05:39:20 +0000 Subject: [PATCH] prepare functions and pr_globals for relocatability --- tools/qfcc/source/qfcc.c | 2 -- tools/qfcc/source/switch.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/qfcc/source/qfcc.c b/tools/qfcc/source/qfcc.c index 27e3fc7e9..b0c3efb6e 100644 --- a/tools/qfcc/source/qfcc.c +++ b/tools/qfcc/source/qfcc.c @@ -142,8 +142,6 @@ WriteData (int crc) if (def->scope) continue; if (def->type->type == ev_func) { -// df = &functions[numfunctions]; -// numfunctions++; } else if (def->type->type == ev_field) { dd = &fields[numfielddefs]; numfielddefs++; diff --git a/tools/qfcc/source/switch.c b/tools/qfcc/source/switch.c index 634b35ece..eab68f821 100644 --- a/tools/qfcc/source/switch.c +++ b/tools/qfcc/source/switch.c @@ -323,7 +323,7 @@ build_switch (expr_t *sw, case_node_t *tree, int op, expr_t *sw_val, dstatement_t *st; statref_t *ref; - st = (dstatement_t *) &pr_globals[G_INT (def->ofs) + i]; + st = (dstatement_t *) (G_INT (def->ofs) + i); ref = PR_NewStatref (st, 3); ref->next = tree->labels[i]->e.label.refs; tree->labels[i]->e.label.refs = ref;