Fix compile time warnings

This commit is contained in:
Nick Clifton 2000-06-19 00:59:43 +00:00
parent ec05f67439
commit 5480ccf375
3 changed files with 70 additions and 65 deletions

View File

@ -1,6 +1,7 @@
2000-06-18 Nick Clifton <nickc@redhat.com> 2000-06-18 Nick Clifton <nickc@redhat.com>
* config/tc-v850.c: Fix compile time warnings. * config/tc-v850.c: Fix compile time warnings.
* config/tc-ppc.c: Fix compile time warnings.
2000-06-18 H.J. Lu <hjl@gnu.org> 2000-06-18 H.J. Lu <hjl@gnu.org>

View File

@ -2495,7 +2495,7 @@ ppc_comm (lcomm)
static void static void
ppc_csect (ignore) ppc_csect (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
char endc; char endc;
@ -2645,7 +2645,7 @@ ppc_section (type)
static void static void
ppc_named_section (ignore) ppc_named_section (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *user_name; char *user_name;
const char *real_name; const char *real_name;
@ -2680,7 +2680,7 @@ ppc_named_section (ignore)
static void static void
ppc_extern (ignore) ppc_extern (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
char endc; char endc;
@ -2699,7 +2699,7 @@ ppc_extern (ignore)
static void static void
ppc_lglobl (ignore) ppc_lglobl (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
char endc; char endc;
@ -2722,7 +2722,7 @@ ppc_lglobl (ignore)
static void static void
ppc_rename (ignore) ppc_rename (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
char endc; char endc;
@ -2758,7 +2758,7 @@ ppc_rename (ignore)
static void static void
ppc_stabx (ignore) ppc_stabx (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
int len; int len;
@ -2865,7 +2865,7 @@ ppc_stabx (ignore)
static void static void
ppc_function (ignore) ppc_function (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
char endc; char endc;
@ -2956,7 +2956,7 @@ ppc_function (ignore)
static void static void
ppc_bf (ignore) ppc_bf (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
symbolS *sym; symbolS *sym;
@ -2984,7 +2984,7 @@ ppc_bf (ignore)
static void static void
ppc_ef (ignore) ppc_ef (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
symbolS *sym; symbolS *sym;
@ -3057,7 +3057,7 @@ ppc_biei (ei)
static void static void
ppc_bs (ignore) ppc_bs (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
char endc; char endc;
@ -3093,7 +3093,7 @@ ppc_bs (ignore)
static void static void
ppc_es (ignore) ppc_es (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
symbolS *sym; symbolS *sym;
@ -3118,7 +3118,7 @@ ppc_es (ignore)
static void static void
ppc_bb (ignore) ppc_bb (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
symbolS *sym; symbolS *sym;
@ -3145,7 +3145,7 @@ ppc_bb (ignore)
static void static void
ppc_eb (ignore) ppc_eb (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
symbolS *sym; symbolS *sym;
@ -3170,7 +3170,7 @@ ppc_eb (ignore)
static void static void
ppc_bc (ignore) ppc_bc (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
int len; int len;
@ -3193,7 +3193,7 @@ ppc_bc (ignore)
static void static void
ppc_ec (ignore) ppc_ec (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
symbolS *sym; symbolS *sym;
@ -3213,7 +3213,7 @@ ppc_ec (ignore)
static void static void
ppc_toc (ignore) ppc_toc (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
if (ppc_toc_csect != (symbolS *) NULL) if (ppc_toc_csect != (symbolS *) NULL)
subseg_set (data_section, symbol_get_tc (ppc_toc_csect)->subseg); subseg_set (data_section, symbol_get_tc (ppc_toc_csect)->subseg);
@ -3269,7 +3269,7 @@ ppc_xcoff_cons (log_size)
static void static void
ppc_machine(dummy) ppc_machine(dummy)
int dummy; int dummy ATTRIBUTE_UNUSED;
{ {
discard_rest_of_line(); discard_rest_of_line();
/* What does aix use this for? */ /* What does aix use this for? */
@ -3277,7 +3277,7 @@ ppc_machine(dummy)
static void static void
ppc_vbyte (dummy) ppc_vbyte (dummy)
int dummy; int dummy ATTRIBUTE_UNUSED;
{ {
expressionS exp; expressionS exp;
int byte_count; int byte_count;
@ -3419,7 +3419,7 @@ ppc_set_current_section (new)
*/ */
static void static void
ppc_previous(ignore) ppc_previous(ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
symbolS *tmp; symbolS *tmp;
@ -3452,7 +3452,7 @@ ppc_previous(ignore)
*/ */
static void static void
ppc_pdata(ignore) ppc_pdata(ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
if (pdata_section == 0) if (pdata_section == 0)
{ {
@ -3487,7 +3487,7 @@ ppc_pdata(ignore)
*/ */
static void static void
ppc_ydata(ignore) ppc_ydata(ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
if (ydata_section == 0) if (ydata_section == 0)
{ {
@ -3524,7 +3524,7 @@ ppc_ydata(ignore)
*/ */
static void static void
ppc_reldata(ignore) ppc_reldata(ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
if (reldata_section == 0) if (reldata_section == 0)
{ {
@ -3555,7 +3555,7 @@ ppc_reldata(ignore)
*/ */
static void static void
ppc_rdata(ignore) ppc_rdata(ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
if (rdata_section == 0) if (rdata_section == 0)
{ {
@ -3582,7 +3582,7 @@ ppc_rdata(ignore)
*/ */
static void static void
ppc_ualong(ignore) ppc_ualong(ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
/* try for long */ /* try for long */
cons ( 4 ); cons ( 4 );
@ -3597,7 +3597,7 @@ ppc_ualong(ignore)
*/ */
static void static void
ppc_znop(ignore) ppc_znop(ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
unsigned long insn; unsigned long insn;
const struct powerpc_opcode *opcode; const struct powerpc_opcode *opcode;
@ -3781,7 +3781,7 @@ ppc_pe_comm(lcomm)
void void
ppc_pe_section (ignore) ppc_pe_section (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
/* Strip out the section name */ /* Strip out the section name */
char *section_name; char *section_name;
@ -3943,7 +3943,7 @@ ppc_pe_section (ignore)
static void static void
ppc_pe_function (ignore) ppc_pe_function (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
char endc; char endc;
@ -3966,7 +3966,7 @@ ppc_pe_function (ignore)
static void static void
ppc_pe_tocd (ignore) ppc_pe_tocd (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
if (tocdata_section == 0) if (tocdata_section == 0)
{ {

View File

@ -42,7 +42,7 @@ static boolean warn_unsigned_overflows = FALSE;
static int machine = -1; static int machine = -1;
/* Indicates the target processor(s) for the assemble. */ /* Indicates the target processor(s) for the assemble. */
static unsigned int processor_mask = -1; static int processor_mask = -1;
/* Structure to hold information about predefined registers. */ /* Structure to hold information about predefined registers. */
@ -112,7 +112,7 @@ static int fc;
void void
v850_sdata (int ignore) v850_sdata (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -122,7 +122,7 @@ v850_sdata (int ignore)
} }
void void
v850_tdata (int ignore) v850_tdata (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -132,7 +132,7 @@ v850_tdata (int ignore)
} }
void void
v850_zdata (int ignore) v850_zdata (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -142,7 +142,7 @@ v850_zdata (int ignore)
} }
void void
v850_sbss (int ignore) v850_sbss (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -152,7 +152,7 @@ v850_sbss (int ignore)
} }
void void
v850_tbss (int ignore) v850_tbss (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -162,7 +162,7 @@ v850_tbss (int ignore)
} }
void void
v850_zbss (int ignore) v850_zbss (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -172,7 +172,7 @@ v850_zbss (int ignore)
} }
void void
v850_rosdata (int ignore) v850_rosdata (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -182,7 +182,7 @@ v850_rosdata (int ignore)
} }
void void
v850_rozdata (int ignore) v850_rozdata (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -192,7 +192,7 @@ v850_rozdata (int ignore)
} }
void void
v850_call_table_data (int ignore) v850_call_table_data (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -202,7 +202,7 @@ v850_call_table_data (int ignore)
} }
void void
v850_call_table_text (int ignore) v850_call_table_text (int ignore ATTRIBUTE_UNUSED)
{ {
obj_elf_section_change_hook(); obj_elf_section_change_hook();
@ -212,7 +212,7 @@ v850_call_table_text (int ignore)
} }
void void
v850_bss (int ignore) v850_bss (int ignore ATTRIBUTE_UNUSED)
{ {
register int temp = get_absolute_expression (); register int temp = get_absolute_expression ();
@ -224,7 +224,7 @@ v850_bss (int ignore)
} }
void void
v850_offset (int ignore) v850_offset (int ignore ATTRIBUTE_UNUSED)
{ {
int temp = get_absolute_expression (); int temp = get_absolute_expression ();
@ -245,7 +245,7 @@ v850_comm (area)
char c; char c;
char * p; char * p;
int temp; int temp;
int size; unsigned int size;
symbolS * symbolP; symbolS * symbolP;
int have_align; int have_align;
@ -484,9 +484,10 @@ v850_comm (area)
scommon_section = subseg_new (".scommon", 0); scommon_section = subseg_new (".scommon", 0);
bfd_set_section_flags (stdoutput, scommon_section, applicable bfd_set_section_flags (stdoutput, scommon_section,
(applicable
& (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA
| SEC_HAS_CONTENTS) | SEC_IS_COMMON); | SEC_HAS_CONTENTS)) | SEC_IS_COMMON);
} }
S_SET_SEGMENT (symbolP, scommon_section); S_SET_SEGMENT (symbolP, scommon_section);
break; break;
@ -500,9 +501,10 @@ v850_comm (area)
zcommon_section = subseg_new (".zcommon", 0); zcommon_section = subseg_new (".zcommon", 0);
bfd_set_section_flags (stdoutput, zcommon_section, applicable bfd_set_section_flags (stdoutput, zcommon_section,
(applicable
& (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA
| SEC_HAS_CONTENTS) | SEC_IS_COMMON); | SEC_HAS_CONTENTS)) | SEC_IS_COMMON);
} }
S_SET_SEGMENT (symbolP, zcommon_section); S_SET_SEGMENT (symbolP, zcommon_section);
break; break;
@ -516,9 +518,10 @@ v850_comm (area)
tcommon_section = subseg_new (".tcommon", 0); tcommon_section = subseg_new (".tcommon", 0);
bfd_set_section_flags (stdoutput, tcommon_section, applicable bfd_set_section_flags (stdoutput, tcommon_section,
(applicable
& (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA
| SEC_HAS_CONTENTS) | SEC_IS_COMMON); | SEC_HAS_CONTENTS)) | SEC_IS_COMMON);
} }
S_SET_SEGMENT (symbolP, tcommon_section); S_SET_SEGMENT (symbolP, tcommon_section);
break; break;
@ -855,10 +858,9 @@ system_register_name (expressionP, accept_numbers, accept_list_names)
/* Make sure that the register number is allowable. */ /* Make sure that the register number is allowable. */
if ( reg_number < 0 if ( reg_number < 0
|| reg_number > 5 || (reg_number > 5 && reg_number < 16)
&& reg_number < 16 || reg_number > 20
|| reg_number > 20 )
)
{ {
reg_number = -1; reg_number = -1;
} }
@ -1009,7 +1011,6 @@ parse_register_list
if (* input_line_pointer != '{') if (* input_line_pointer != '{')
{ {
int bits;
int reg; int reg;
int i; int i;
@ -1200,8 +1201,9 @@ md_parse_option (c, arg)
{ {
if (c != 'm') if (c != 'm')
{ {
/* xgettext:c-format */ if (c != 'a')
fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg); /* xgettext:c-format */
fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg);
return 0; return 0;
} }
@ -1245,7 +1247,7 @@ md_parse_option (c, arg)
symbolS * symbolS *
md_undefined_symbol (name) md_undefined_symbol (name)
char * name; char * name ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }
@ -1295,7 +1297,7 @@ md_atof (type, litp, sizep)
/* Very gross. */ /* Very gross. */
void void
md_convert_frag (abfd, sec, fragP) md_convert_frag (abfd, sec, fragP)
bfd * abfd; bfd * abfd ATTRIBUTE_UNUSED;
asection * sec; asection * sec;
fragS * fragP; fragS * fragP;
{ {
@ -1590,8 +1592,7 @@ v850_insert_operand (insn, operand, val, file, line, str)
{ {
if (operand->bits != 32) if (operand->bits != 32)
{ {
long min, max; long min, max;
offsetT test;
if ((operand->flags & V850_OPERAND_SIGNED) != 0) if ((operand->flags & V850_OPERAND_SIGNED) != 0)
{ {
@ -1662,15 +1663,15 @@ md_assemble (str)
struct v850_opcode * next_opcode; struct v850_opcode * next_opcode;
const unsigned char * opindex_ptr; const unsigned char * opindex_ptr;
int next_opindex; int next_opindex;
int relaxable; int relaxable = 0;
unsigned long insn; unsigned long insn;
unsigned long insn_size; unsigned long insn_size;
char * f; char * f;
int i; int i;
int match; int match;
boolean extra_data_after_insn = false; boolean extra_data_after_insn = false;
unsigned extra_data_len; unsigned extra_data_len = 0;
unsigned long extra_data; unsigned long extra_data = 0;
char * saved_input_line_pointer; char * saved_input_line_pointer;
@ -2213,6 +2214,8 @@ md_assemble (str)
case BFD_RELOC_HI16_S: case BFD_RELOC_HI16_S:
fixP->fx_no_overflow = 1; fixP->fx_no_overflow = 1;
break; break;
default:
break;
} }
} }
else else
@ -2237,7 +2240,7 @@ md_assemble (str)
arelent * arelent *
tc_gen_reloc (seg, fixp) tc_gen_reloc (seg, fixp)
asection * seg; asection * seg ATTRIBUTE_UNUSED;
fixS * fixp; fixS * fixp;
{ {
arelent * reloc; arelent * reloc;
@ -2273,7 +2276,7 @@ tc_gen_reloc (seg, fixp)
int int
md_estimate_size_before_relax (fragp, seg) md_estimate_size_before_relax (fragp, seg)
fragS * fragp; fragS * fragp;
asection * seg; asection * seg ATTRIBUTE_UNUSED;
{ {
if (fragp->fr_subtype == 0) if (fragp->fr_subtype == 0)
fragp->fr_var = 4; fragp->fr_var = 4;
@ -2305,7 +2308,7 @@ int
md_apply_fix3 (fixp, valuep, seg) md_apply_fix3 (fixp, valuep, seg)
fixS * fixp; fixS * fixp;
valueT * valuep; valueT * valuep;
segT seg; segT seg ATTRIBUTE_UNUSED;
{ {
valueT value; valueT value;
char * where; char * where;
@ -2452,6 +2455,7 @@ v850_fix_adjustable (fixP)
if (S_IS_EXTERN (fixP->fx_addsy)) if (S_IS_EXTERN (fixP->fx_addsy))
return 0; return 0;
/* Similarly for weak symbols. */
if (S_IS_WEAK (fixP->fx_addsy)) if (S_IS_WEAK (fixP->fx_addsy))
return 0; return 0;