Fix more unused variable warnings

This commit is contained in:
Alan Modra
2025-07-18 16:53:38 +09:30
parent 1cfce7750a
commit 9472a0558d
7 changed files with 6 additions and 21 deletions

View File

@@ -119,7 +119,6 @@ const size_t md_longopts_size = sizeof (md_longopts);
static void static void
l_cons (int nbytes) l_cons (int nbytes)
{ {
int c;
expressionS exp; expressionS exp;
#ifdef md_flush_pending_output #ifdef md_flush_pending_output
@@ -141,7 +140,6 @@ l_cons (int nbytes)
md_cons_align (nbytes); md_cons_align (nbytes);
#endif #endif
c = 0;
do do
{ {
unsigned int bits_available = BITS_PER_CHAR * nbytes; unsigned int bits_available = BITS_PER_CHAR * nbytes;
@@ -236,7 +234,6 @@ l_cons (int nbytes)
if ((*(input_line_pointer) == '@') && (*(input_line_pointer +1) == 'c')) if ((*(input_line_pointer) == '@') && (*(input_line_pointer +1) == 'c'))
code_label = 1; code_label = 1;
emit_expr (&exp, nbytes); emit_expr (&exp, nbytes);
++c;
if ((*(input_line_pointer) == '@') && (*(input_line_pointer +1) == 'c')) if ((*(input_line_pointer) == '@') && (*(input_line_pointer +1) == 'c'))
{ {
input_line_pointer +=3; input_line_pointer +=3;

View File

@@ -896,7 +896,6 @@ md_assemble (char *str)
for (;;) for (;;)
{ {
const char *errmsg = NULL; const char *errmsg = NULL;
int op_idx;
char *hold; char *hold;
int extra_shift = 0; int extra_shift = 0;
@@ -906,9 +905,9 @@ md_assemble (char *str)
next_opindex = 0; next_opindex = 0;
insn = opcode->opcode; insn = opcode->opcode;
extension = 0; extension = 0;
for (op_idx = 1, opindex_ptr = opcode->operands; for (opindex_ptr = opcode->operands;
*opindex_ptr != 0; *opindex_ptr != 0;
opindex_ptr++, op_idx++) opindex_ptr++)
{ {
const struct mn10200_operand *operand; const struct mn10200_operand *operand;
expressionS ex; expressionS ex;

View File

@@ -344,15 +344,10 @@ v850_comm (int area)
int old_subsec; int old_subsec;
char *pfrag; char *pfrag;
int align; int align;
flagword applicable;
old_sec = now_seg; old_sec = now_seg;
old_subsec = now_subseg; old_subsec = now_subseg;
applicable = bfd_applicable_section_flags (stdoutput);
applicable &= SEC_ALLOC;
switch (area) switch (area)
{ {
case SCOMMON_SECTION: case SCOMMON_SECTION:

View File

@@ -1123,7 +1123,6 @@ xgate_scan_operands (struct xgate_opcode *opcode, s_operand oprs[])
unsigned short oper_mask = 0; unsigned short oper_mask = 0;
int operand_bit_length = 0; int operand_bit_length = 0;
unsigned int operand = 0; unsigned int operand = 0;
char n_operand_bits = 0;
char first_operand_equals_second = 0; char first_operand_equals_second = 0;
int i = 0; int i = 0;
char c = 0; char c = 0;
@@ -1139,7 +1138,6 @@ xgate_scan_operands (struct xgate_opcode *opcode, s_operand oprs[])
{ {
oper_mask <<= 1; oper_mask <<= 1;
oper_mask += 1; oper_mask += 1;
n_operand_bits++;
} }
} }

View File

@@ -1032,7 +1032,6 @@ build_bytes (opcode_entry_type *this_try, struct z8k_op *operand ATTRIBUTE_UNUSE
{ {
unsigned char *output_ptr = buffer; unsigned char *output_ptr = buffer;
int c; int c;
int nibble;
unsigned int *class_ptr; unsigned int *class_ptr;
frag_wane (frag_now); frag_wane (frag_now);
@@ -1044,7 +1043,7 @@ build_bytes (opcode_entry_type *this_try, struct z8k_op *operand ATTRIBUTE_UNUSE
memset (buffer, 0, sizeof (buffer)); memset (buffer, 0, sizeof (buffer));
class_ptr = this_try->byte_info; class_ptr = this_try->byte_info;
for (nibble = 0; (c = *class_ptr++); nibble++) while ((c = *class_ptr++) != 0)
{ {
switch (c & CLASS_MASK) switch (c & CLASS_MASK)

View File

@@ -3606,7 +3606,6 @@ ecoff_build_lineno (const struct ecoff_debug_swap *backend,
efdr_t *file; efdr_t *file;
proc_t *proc; proc_t *proc;
unsigned long c; unsigned long c;
long iline;
long totcount; long totcount;
lineno_list_t first; lineno_list_t first;
lineno_list_t *local_first_lineno = first_lineno; lineno_list_t *local_first_lineno = first_lineno;
@@ -3620,7 +3619,6 @@ ecoff_build_lineno (const struct ecoff_debug_swap *backend,
proc = NULL; proc = NULL;
last = NULL; last = NULL;
c = offset; c = offset;
iline = 0;
totcount = 0; totcount = 0;
/* FIXME? Now that MIPS embedded-PIC is gone, it may be safe to /* FIXME? Now that MIPS embedded-PIC is gone, it may be safe to
@@ -3800,7 +3798,6 @@ ecoff_build_lineno (const struct ecoff_debug_swap *backend,
++c; ++c;
} }
++iline;
last = l; last = l;
} }

View File

@@ -2242,7 +2242,7 @@ write_object_file (void)
char *table_ptr; char *table_ptr;
addressT table_addr; addressT table_addr;
addressT from_addr, to_addr; addressT from_addr, to_addr;
int n, m; int n;
subseg_change (lie->seg, lie->subseg); subseg_change (lie->seg, lie->subseg);
fragP = lie->dispfrag; fragP = lie->dispfrag;
@@ -2267,9 +2267,9 @@ write_object_file (void)
table_ptr += md_short_jump_size; table_ptr += md_short_jump_size;
table_addr += md_short_jump_size; table_addr += md_short_jump_size;
for (m = 0; for (;
lie && lie->dispfrag == fragP; lie && lie->dispfrag == fragP;
m++, lie = lie->next_broken_word) lie = lie->next_broken_word)
{ {
if (lie->added == 2) if (lie->added == 2)
continue; continue;