From: Nick Clifton Date: Mon, 19 Jun 2000 00:59:43 +0000 (+0000) Subject: Fix compile time warnings X-Git-Tag: readline-pre-41-import~152 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5480ccf3750ad31a2f2e03aef882002141699a04;p=external%2Fbinutils.git Fix compile time warnings --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 0c195a3..b995c68 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,6 +1,7 @@ 2000-06-18 Nick Clifton * config/tc-v850.c: Fix compile time warnings. + * config/tc-ppc.c: Fix compile time warnings. 2000-06-18 H.J. Lu diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index b4e9668..417c632 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -2495,7 +2495,7 @@ ppc_comm (lcomm) static void ppc_csect (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2645,7 +2645,7 @@ ppc_section (type) static void ppc_named_section (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *user_name; const char *real_name; @@ -2680,7 +2680,7 @@ ppc_named_section (ignore) static void ppc_extern (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2699,7 +2699,7 @@ ppc_extern (ignore) static void ppc_lglobl (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2722,7 +2722,7 @@ ppc_lglobl (ignore) static void ppc_rename (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2758,7 +2758,7 @@ ppc_rename (ignore) static void ppc_stabx (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int len; @@ -2865,7 +2865,7 @@ ppc_stabx (ignore) static void ppc_function (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2956,7 +2956,7 @@ ppc_function (ignore) static void ppc_bf (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -2984,7 +2984,7 @@ ppc_bf (ignore) static void ppc_ef (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3057,7 +3057,7 @@ ppc_biei (ei) static void ppc_bs (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -3093,7 +3093,7 @@ ppc_bs (ignore) static void ppc_es (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3118,7 +3118,7 @@ ppc_es (ignore) static void ppc_bb (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3145,7 +3145,7 @@ ppc_bb (ignore) static void ppc_eb (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3170,7 +3170,7 @@ ppc_eb (ignore) static void ppc_bc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int len; @@ -3193,7 +3193,7 @@ ppc_bc (ignore) static void ppc_ec (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3213,7 +3213,7 @@ ppc_ec (ignore) static void ppc_toc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (ppc_toc_csect != (symbolS *) NULL) subseg_set (data_section, symbol_get_tc (ppc_toc_csect)->subseg); @@ -3269,7 +3269,7 @@ ppc_xcoff_cons (log_size) static void ppc_machine(dummy) - int dummy; + int dummy ATTRIBUTE_UNUSED; { discard_rest_of_line(); /* What does aix use this for? */ @@ -3277,7 +3277,7 @@ ppc_machine(dummy) static void ppc_vbyte (dummy) - int dummy; + int dummy ATTRIBUTE_UNUSED; { expressionS exp; int byte_count; @@ -3419,7 +3419,7 @@ ppc_set_current_section (new) */ static void ppc_previous(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *tmp; @@ -3452,7 +3452,7 @@ ppc_previous(ignore) */ static void ppc_pdata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (pdata_section == 0) { @@ -3487,7 +3487,7 @@ ppc_pdata(ignore) */ static void ppc_ydata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (ydata_section == 0) { @@ -3524,7 +3524,7 @@ ppc_ydata(ignore) */ static void ppc_reldata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (reldata_section == 0) { @@ -3555,7 +3555,7 @@ ppc_reldata(ignore) */ static void ppc_rdata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (rdata_section == 0) { @@ -3582,7 +3582,7 @@ ppc_rdata(ignore) */ static void ppc_ualong(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* try for long */ cons ( 4 ); @@ -3597,7 +3597,7 @@ ppc_ualong(ignore) */ static void ppc_znop(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { unsigned long insn; const struct powerpc_opcode *opcode; @@ -3781,7 +3781,7 @@ ppc_pe_comm(lcomm) void ppc_pe_section (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* Strip out the section name */ char *section_name; @@ -3943,7 +3943,7 @@ ppc_pe_section (ignore) static void ppc_pe_function (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -3966,7 +3966,7 @@ ppc_pe_function (ignore) static void ppc_pe_tocd (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (tocdata_section == 0) { diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index e53054d..b59d42b 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -42,7 +42,7 @@ static boolean warn_unsigned_overflows = FALSE; static int machine = -1; /* 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. */ @@ -112,7 +112,7 @@ static int fc; void -v850_sdata (int ignore) +v850_sdata (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -122,7 +122,7 @@ v850_sdata (int ignore) } void -v850_tdata (int ignore) +v850_tdata (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -132,7 +132,7 @@ v850_tdata (int ignore) } void -v850_zdata (int ignore) +v850_zdata (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -142,7 +142,7 @@ v850_zdata (int ignore) } void -v850_sbss (int ignore) +v850_sbss (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -152,7 +152,7 @@ v850_sbss (int ignore) } void -v850_tbss (int ignore) +v850_tbss (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -162,7 +162,7 @@ v850_tbss (int ignore) } void -v850_zbss (int ignore) +v850_zbss (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -172,7 +172,7 @@ v850_zbss (int ignore) } void -v850_rosdata (int ignore) +v850_rosdata (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -182,7 +182,7 @@ v850_rosdata (int ignore) } void -v850_rozdata (int ignore) +v850_rozdata (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -192,7 +192,7 @@ v850_rozdata (int ignore) } void -v850_call_table_data (int ignore) +v850_call_table_data (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -202,7 +202,7 @@ v850_call_table_data (int ignore) } void -v850_call_table_text (int ignore) +v850_call_table_text (int ignore ATTRIBUTE_UNUSED) { obj_elf_section_change_hook(); @@ -212,7 +212,7 @@ v850_call_table_text (int ignore) } void -v850_bss (int ignore) +v850_bss (int ignore ATTRIBUTE_UNUSED) { register int temp = get_absolute_expression (); @@ -224,7 +224,7 @@ v850_bss (int ignore) } void -v850_offset (int ignore) +v850_offset (int ignore ATTRIBUTE_UNUSED) { int temp = get_absolute_expression (); @@ -245,7 +245,7 @@ v850_comm (area) char c; char * p; int temp; - int size; + unsigned int size; symbolS * symbolP; int have_align; @@ -484,9 +484,10 @@ v850_comm (area) 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_HAS_CONTENTS) | SEC_IS_COMMON); + | SEC_HAS_CONTENTS)) | SEC_IS_COMMON); } S_SET_SEGMENT (symbolP, scommon_section); break; @@ -500,9 +501,10 @@ v850_comm (area) 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_HAS_CONTENTS) | SEC_IS_COMMON); + | SEC_HAS_CONTENTS)) | SEC_IS_COMMON); } S_SET_SEGMENT (symbolP, zcommon_section); break; @@ -516,9 +518,10 @@ v850_comm (area) 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_HAS_CONTENTS) | SEC_IS_COMMON); + | SEC_HAS_CONTENTS)) | SEC_IS_COMMON); } S_SET_SEGMENT (symbolP, tcommon_section); break; @@ -855,10 +858,9 @@ system_register_name (expressionP, accept_numbers, accept_list_names) /* Make sure that the register number is allowable. */ if ( reg_number < 0 - || reg_number > 5 - && reg_number < 16 - || reg_number > 20 - ) + || (reg_number > 5 && reg_number < 16) + || reg_number > 20 + ) { reg_number = -1; } @@ -1009,7 +1011,6 @@ parse_register_list if (* input_line_pointer != '{') { - int bits; int reg; int i; @@ -1200,8 +1201,9 @@ md_parse_option (c, arg) { if (c != 'm') { - /* xgettext:c-format */ - fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg); + if (c != 'a') + /* xgettext:c-format */ + fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg); return 0; } @@ -1245,7 +1247,7 @@ md_parse_option (c, arg) symbolS * md_undefined_symbol (name) - char * name; + char * name ATTRIBUTE_UNUSED; { return 0; } @@ -1295,7 +1297,7 @@ md_atof (type, litp, sizep) /* Very gross. */ void md_convert_frag (abfd, sec, fragP) - bfd * abfd; + bfd * abfd ATTRIBUTE_UNUSED; asection * sec; fragS * fragP; { @@ -1590,8 +1592,7 @@ v850_insert_operand (insn, operand, val, file, line, str) { if (operand->bits != 32) { - long min, max; - offsetT test; + long min, max; if ((operand->flags & V850_OPERAND_SIGNED) != 0) { @@ -1662,15 +1663,15 @@ md_assemble (str) struct v850_opcode * next_opcode; const unsigned char * opindex_ptr; int next_opindex; - int relaxable; + int relaxable = 0; unsigned long insn; unsigned long insn_size; char * f; int i; int match; boolean extra_data_after_insn = false; - unsigned extra_data_len; - unsigned long extra_data; + unsigned extra_data_len = 0; + unsigned long extra_data = 0; char * saved_input_line_pointer; @@ -2213,6 +2214,8 @@ md_assemble (str) case BFD_RELOC_HI16_S: fixP->fx_no_overflow = 1; break; + default: + break; } } else @@ -2237,7 +2240,7 @@ md_assemble (str) arelent * tc_gen_reloc (seg, fixp) - asection * seg; + asection * seg ATTRIBUTE_UNUSED; fixS * fixp; { arelent * reloc; @@ -2273,7 +2276,7 @@ tc_gen_reloc (seg, fixp) int md_estimate_size_before_relax (fragp, seg) fragS * fragp; - asection * seg; + asection * seg ATTRIBUTE_UNUSED; { if (fragp->fr_subtype == 0) fragp->fr_var = 4; @@ -2305,7 +2308,7 @@ int md_apply_fix3 (fixp, valuep, seg) fixS * fixp; valueT * valuep; - segT seg; + segT seg ATTRIBUTE_UNUSED; { valueT value; char * where; @@ -2452,6 +2455,7 @@ v850_fix_adjustable (fixP) if (S_IS_EXTERN (fixP->fx_addsy)) return 0; + /* Similarly for weak symbols. */ if (S_IS_WEAK (fixP->fx_addsy)) return 0;