]> granicus.if.org Git - yasm/commitdiff
Fix a bunch of unused variable warnings and a warning/bug in
authorPeter Johnson <peter@tortall.net>
Sat, 12 Aug 2006 02:37:05 +0000 (02:37 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 12 Aug 2006 02:37:05 +0000 (02:37 -0000)
yasm_object_optimize().

svn path=/trunk/yasm/; revision=1604

libyasm/expr.c
libyasm/inttree.c
libyasm/section.c
modules/arch/x86/x86bc.c

index 5332f6b7ce1fb7fc4c0d18a6858728f7ab11ee1c..60f2409aaab4616cf62eb4f82095b0e1fc30ad90 100644 (file)
@@ -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
index caabd0ec8903edf1cc8994a2571977256e78e1c8..dbb2921553debecc3c826c5a03bb28d3b3ad9b57 100644 (file)
@@ -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 *);
index 9ffc3555099f78eea7d2e43ad076a5f3f36f6457..8ca23dbf145de6ccdbf152521ee4b07946f652fb 100644 (file)
@@ -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;
                    }
                }
index 6bdc594fd45e1c775ac2aea6e23e92f7dd5015d3..b2f01d048afde228305d4652dfb9caa230a155a2 100644 (file)
@@ -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. */