From: Peter Johnson Date: Sat, 12 Aug 2006 02:37:05 +0000 (-0000) Subject: Fix a bunch of unused variable warnings and a warning/bug in X-Git-Tag: v0.6.0~167 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e31b407c28f168bf04731d7cf5fb608aefc5f213;p=yasm Fix a bunch of unused variable warnings and a warning/bug in yasm_object_optimize(). svn path=/trunk/yasm/; revision=1604 --- diff --git a/libyasm/expr.c b/libyasm/expr.c index 5332f6b7..60f2409a 100644 --- a/libyasm/expr.c +++ b/libyasm/expr.c @@ -198,7 +198,6 @@ expr_xform_bc_dist_base(/*@returned@*/ /*@only@*/ yasm_expr *e, int i; /*@dependent@*/ yasm_section *sect; /*@dependent@*/ /*@null@*/ yasm_bytecode *precbc; - /*@null@*/ yasm_intnum *dist; int numterms; /* Handle symrec-symrec in ADD exprs by looking for (-1*symrec) and diff --git a/libyasm/inttree.c b/libyasm/inttree.c index caabd0ec..dbb29215 100644 --- a/libyasm/inttree.c +++ b/libyasm/inttree.c @@ -36,8 +36,6 @@ static void Assert(int assertion, const char *error) /*#define CHECK_INTERVAL_TREE_ASSUMPTIONS 1*/ static IntervalTreeNode *ITN_create(long low, long high, void *data); -static void ITN_Print(const IntervalTreeNode *itn, IntervalTreeNode *nil, - IntervalTreeNode *root); static void LeftRotate(IntervalTree *, IntervalTreeNode *); static void RightRotate(IntervalTree *, IntervalTreeNode *); diff --git a/libyasm/section.c b/libyasm/section.c index 9ffc3555..8ca23dbf 100644 --- a/libyasm/section.c +++ b/libyasm/section.c @@ -840,7 +840,6 @@ static void span_create_terms(yasm_span *span) { unsigned int i; - yasm_intnum *intn; /* Split out sym-sym terms in absolute portion of dependent value */ if (span->depval.abs) { @@ -1209,7 +1208,7 @@ yasm_object_optimize(yasm_object *object, yasm_arch *arch, if (bc->multiple) { yasm_error_set(YASM_ERROR_VALUE, N_("cannot combine multiples and setting assembly position")); - yasm_errwarn_propagate(errwarns, span->bc->line); + yasm_errwarn_propagate(errwarns, bc->line); saw_error = 1; } } diff --git a/modules/arch/x86/x86bc.c b/modules/arch/x86/x86bc.c index 6bdc594f..b2f01d04 100644 --- a/modules/arch/x86/x86bc.c +++ b/modules/arch/x86/x86bc.c @@ -602,7 +602,6 @@ x86_bc_insn_expand(yasm_bytecode *bc, int span, long old_val, long new_val, /*@out@*/ long *neg_thres, /*@out@*/ long *pos_thres) { x86_insn *insn = (x86_insn *)bc->contents; - /*@null@*/ yasm_expr *temp; x86_effaddr *x86_ea = insn->x86_ea; yasm_effaddr *ea = &x86_ea->ea; yasm_immval *imm = insn->imm; @@ -640,10 +639,6 @@ x86_bc_jmp_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span, { x86_jmp *jmp = (x86_jmp *)bc->contents; yasm_bytecode *target_prevbc; - /*@null@*/ yasm_expr *temp; - /*@only@*/ yasm_intnum *num; - /*@dependent@*/ /*@null@*/ yasm_intnum *num2; - long rel; unsigned char opersize; /* As opersize may be 0, figure out its "real" value. */