Fix compile time warning messages.

This commit is contained in:
Nick Clifton 2000-05-29 22:05:27 +00:00
parent 5c82d20a26
commit 43841e9116
3 changed files with 59 additions and 49 deletions

View File

@ -1,3 +1,9 @@
2000-05-29 Nick Clifton <nickc@cygnus.com>
* config/tc-sh.c: Fix compile time warning messages.
* config/tc-mips.c: Fix compile time warning messages.
2000-05-29 Philip Blundell <philb@gnu.org> 2000-05-29 Philip Blundell <philb@gnu.org>
* doc/as.texinfo: Update copyright dates. * doc/as.texinfo: Update copyright dates.

View File

@ -183,7 +183,7 @@ struct mips_set_options
that we must set the isa and mips16 fields to -1 to indicate that that we must set the isa and mips16 fields to -1 to indicate that
they have not been initialized. */ they have not been initialized. */
static struct mips_set_options mips_opts = { -1, -1 }; static struct mips_set_options mips_opts = { -1, -1, 0, 0, 0, 0, 0, 0 };
/* These variables are filled in with the masks of registers used. /* These variables are filled in with the masks of registers used.
The object format code reads them and puts them in the appropriate The object format code reads them and puts them in the appropriate
@ -407,7 +407,7 @@ static struct mips_cl_insn prev_prev_insn;
/* If we don't want information for prev_insn or prev_prev_insn, we /* If we don't want information for prev_insn or prev_prev_insn, we
point the insn_mo field at this dummy integer. */ point the insn_mo field at this dummy integer. */
static const struct mips_opcode dummy_opcode = { 0 }; static const struct mips_opcode dummy_opcode = { NULL, NULL, 0, 0, 0, 0 };
/* Non-zero if prev_insn is valid. */ /* Non-zero if prev_insn is valid. */
static int prev_insn_valid; static int prev_insn_valid;
@ -756,7 +756,7 @@ static const pseudo_typeS mips_pseudo_table[] =
{"stabn", s_mips_stab, 'n'}, {"stabn", s_mips_stab, 'n'},
{"text", s_change_sec, 't'}, {"text", s_change_sec, 't'},
{"word", s_cons, 2}, {"word", s_cons, 2},
{ 0 }, { NULL, NULL, 0 },
}; };
static const pseudo_typeS mips_nonecoff_pseudo_table[] = { static const pseudo_typeS mips_nonecoff_pseudo_table[] = {
@ -773,7 +773,7 @@ static const pseudo_typeS mips_nonecoff_pseudo_table[] = {
{"loc", s_ignore, 0}, {"loc", s_ignore, 0},
{"mask", s_mips_mask, 'R'}, {"mask", s_mips_mask, 'R'},
{"verstamp", s_ignore, 0}, {"verstamp", s_ignore, 0},
{ 0 }, { NULL, NULL, 0 },
}; };
extern void pop_insert PARAMS ((const pseudo_typeS *)); extern void pop_insert PARAMS ((const pseudo_typeS *));
@ -2660,7 +2660,7 @@ macro_build (place, counter, ep, name, fmt, va_alist)
static void static void
mips16_macro_build (place, counter, ep, name, fmt, args) mips16_macro_build (place, counter, ep, name, fmt, args)
char *place; char *place;
int *counter; int *counter ATTRIBUTE_UNUSED;
expressionS *ep; expressionS *ep;
const char *name; const char *name;
const char *fmt; const char *fmt;
@ -3443,7 +3443,7 @@ macro (ip)
int tempreg; int tempreg;
int mask; int mask;
int icnt = 0; int icnt = 0;
int used_at; int used_at = 0;
expressionS expr1; expressionS expr1;
const char *s; const char *s;
const char *s2; const char *s2;
@ -6408,8 +6408,8 @@ macro2 (ip)
macro_build ((char *) NULL, &icnt, NULL, s, "s,t", sreg, AT); macro_build ((char *) NULL, &icnt, NULL, s, "s,t", sreg, AT);
break; break;
case M_TRUNCWD:
case M_TRUNCWS: case M_TRUNCWS:
case M_TRUNCWD:
assert (mips_opts.isa == 1); assert (mips_opts.isa == 1);
sreg = (ip->insn_opcode >> 11) & 0x1f; /* floating reg */ sreg = (ip->insn_opcode >> 11) & 0x1f; /* floating reg */
dreg = (ip->insn_opcode >> 06) & 0x1f; /* floating reg */ dreg = (ip->insn_opcode >> 06) & 0x1f; /* floating reg */
@ -6997,7 +6997,7 @@ mips_ip (str, ip)
{ {
char *s; char *s;
const char *args; const char *args;
char c; char c = 0;
struct mips_opcode *insn; struct mips_opcode *insn;
char *argsStart; char *argsStart;
unsigned int regno; unsigned int regno;
@ -7083,7 +7083,7 @@ mips_ip (str, ip)
continue; continue;
} }
else else
{ {
static char buf[100]; static char buf[100];
sprintf (buf, sprintf (buf,
_("opcode not supported on this processor: %d (MIPS%d)"), _("opcode not supported on this processor: %d (MIPS%d)"),
@ -9363,7 +9363,7 @@ md_pcrel_from (fixP)
void void
cons_fix_new_mips (frag, where, nbytes, exp) cons_fix_new_mips (frag, where, nbytes, exp)
fragS *frag; fragS *frag ATTRIBUTE_UNUSED;
int where; int where;
unsigned int nbytes; unsigned int nbytes;
expressionS *exp; expressionS *exp;
@ -9940,7 +9940,7 @@ mips_align (to, fill, label)
static void static void
s_align (x) s_align (x)
int x; int x ATTRIBUTE_UNUSED;
{ {
register int temp; register int temp;
register long temp_fill; register long temp_fill;
@ -10134,7 +10134,7 @@ s_float_cons (type)
static void static void
s_mips_globl (x) s_mips_globl (x)
int x; int x ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
int c; int c;
@ -10175,7 +10175,7 @@ s_mips_globl (x)
static void static void
s_option (x) s_option (x)
int x; int x ATTRIBUTE_UNUSED;
{ {
char *opt; char *opt;
char c; char c;
@ -10228,7 +10228,7 @@ static struct mips_option_stack *mips_opts_stack;
static void static void
s_mipsset (x) s_mipsset (x)
int x; int x ATTRIBUTE_UNUSED;
{ {
char *name = input_line_pointer, ch; char *name = input_line_pointer, ch;
@ -10364,7 +10364,7 @@ s_mipsset (x)
static void static void
s_abicalls (ignore) s_abicalls (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
mips_pic = SVR4_PIC; mips_pic = SVR4_PIC;
if (USE_GLOBAL_POINTER_OPT) if (USE_GLOBAL_POINTER_OPT)
@ -10389,7 +10389,7 @@ s_abicalls (ignore)
static void static void
s_cpload (ignore) s_cpload (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
expressionS ex; expressionS ex;
int icnt = 0; int icnt = 0;
@ -10429,7 +10429,7 @@ s_cpload (ignore)
static void static void
s_cprestore (ignore) s_cprestore (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
expressionS ex; expressionS ex;
int icnt = 0; int icnt = 0;
@ -10462,7 +10462,7 @@ s_cprestore (ignore)
static void static void
s_gpword (ignore) s_gpword (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
symbolS *label; symbolS *label;
expressionS ex; expressionS ex;
@ -10502,7 +10502,7 @@ s_gpword (ignore)
static void static void
s_cpadd (ignore) s_cpadd (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
int icnt = 0; int icnt = 0;
int reg; int reg;
@ -10536,7 +10536,7 @@ s_cpadd (ignore)
static void static void
s_insn (ignore) s_insn (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
if (mips_opts.mips16) if (mips_opts.mips16)
mips16_mark_labels (); mips16_mark_labels ();
@ -10565,7 +10565,7 @@ s_mips_stab (type)
static void static void
s_mips_weakext (ignore) s_mips_weakext (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
int c; int c;
@ -10975,7 +10975,7 @@ md_estimate_size_before_relax (fragp, segtype)
fragS *fragp; fragS *fragp;
asection *segtype; asection *segtype;
{ {
int change; int change = 0;
if (RELAX_MIPS16_P (fragp->fr_subtype)) if (RELAX_MIPS16_P (fragp->fr_subtype))
{ {
@ -11083,7 +11083,7 @@ mips_fix_adjustable (fixp)
arelent ** arelent **
tc_gen_reloc (section, fixp) tc_gen_reloc (section, fixp)
asection *section; asection *section ATTRIBUTE_UNUSED;
fixS *fixp; fixS *fixp;
{ {
static arelent *retval[4]; static arelent *retval[4];
@ -11324,7 +11324,7 @@ mips_relax_frag (fragp, stretch)
void void
md_convert_frag (abfd, asec, fragp) md_convert_frag (abfd, asec, fragp)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
segT asec; segT asec;
fragS *fragp; fragS *fragp;
{ {
@ -11584,7 +11584,7 @@ int
mips_do_align (n, fill, len, max) mips_do_align (n, fill, len, max)
int n; int n;
const char *fill; const char *fill;
int len; int len ATTRIBUTE_UNUSED;
int max; int max;
{ {
if (fill == NULL if (fill == NULL
@ -11676,7 +11676,7 @@ get_number ()
static void static void
s_file (x) s_file (x)
int x; int x ATTRIBUTE_UNUSED;
{ {
int line; int line;
@ -11689,7 +11689,7 @@ s_file (x)
static void static void
s_mips_end (x) s_mips_end (x)
int x; int x ATTRIBUTE_UNUSED;
{ {
symbolS *p; symbolS *p;
int maybe_text; int maybe_text;

View File

@ -30,6 +30,7 @@
#define DEFINE_TABLE #define DEFINE_TABLE
#include "opcodes/sh-opc.h" #include "opcodes/sh-opc.h"
#include <ctype.h> #include <ctype.h>
#include "struc-symbol.h"
#ifdef OBJ_ELF #ifdef OBJ_ELF
#include "elf/sh.h" #include "elf/sh.h"
@ -54,7 +55,7 @@ int shl = 0;
static void static void
little (ignore) little (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
shl = 1; shl = 1;
target_big_endian = 0; target_big_endian = 0;
@ -159,39 +160,43 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define UNCOND32_M -(1<<30) #define UNCOND32_M -(1<<30)
#define UNCOND32_LENGTH 14 #define UNCOND32_LENGTH 14
const relax_typeS md_relax_table[C (END, 0)] = { #define EMPTY { 0, 0, 0, 0 }
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
{ 0 }, const relax_typeS md_relax_table[C (END, 0)] = {
EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
EMPTY,
/* C (COND_JUMP, COND8) */ /* C (COND_JUMP, COND8) */
{ COND8_F, COND8_M, COND8_LENGTH, C (COND_JUMP, COND12) }, { COND8_F, COND8_M, COND8_LENGTH, C (COND_JUMP, COND12) },
/* C (COND_JUMP, COND12) */ /* C (COND_JUMP, COND12) */
{ COND12_F, COND12_M, COND12_LENGTH, C (COND_JUMP, COND32), }, { COND12_F, COND12_M, COND12_LENGTH, C (COND_JUMP, COND32), },
/* C (COND_JUMP, COND32) */ /* C (COND_JUMP, COND32) */
{ COND32_F, COND32_M, COND32_LENGTH, 0, }, { COND32_F, COND32_M, COND32_LENGTH, 0, },
{ 0 }, { 0 }, { 0 }, { 0 }, EMPTY, EMPTY, EMPTY, EMPTY,
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
{ 0 }, EMPTY,
/* C (COND_JUMP_DELAY, COND8) */ /* C (COND_JUMP_DELAY, COND8) */
{ COND8_F, COND8_M, COND8_LENGTH, C (COND_JUMP_DELAY, COND12) }, { COND8_F, COND8_M, COND8_LENGTH, C (COND_JUMP_DELAY, COND12) },
/* C (COND_JUMP_DELAY, COND12) */ /* C (COND_JUMP_DELAY, COND12) */
{ COND12_F, COND12_M, COND12_DELAY_LENGTH, C (COND_JUMP_DELAY, COND32), }, { COND12_F, COND12_M, COND12_DELAY_LENGTH, C (COND_JUMP_DELAY, COND32), },
/* C (COND_JUMP_DELAY, COND32) */ /* C (COND_JUMP_DELAY, COND32) */
{ COND32_F, COND32_M, COND32_LENGTH, 0, }, { COND32_F, COND32_M, COND32_LENGTH, 0, },
{ 0 }, { 0 }, { 0 }, { 0 }, EMPTY, EMPTY, EMPTY, EMPTY,
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
{ 0 }, EMPTY,
/* C (UNCOND_JUMP, UNCOND12) */ /* C (UNCOND_JUMP, UNCOND12) */
{ UNCOND12_F, UNCOND12_M, UNCOND12_LENGTH, C (UNCOND_JUMP, UNCOND32), }, { UNCOND12_F, UNCOND12_M, UNCOND12_LENGTH, C (UNCOND_JUMP, UNCOND32), },
/* C (UNCOND_JUMP, UNCOND32) */ /* C (UNCOND_JUMP, UNCOND32) */
{ UNCOND32_F, UNCOND32_M, UNCOND32_LENGTH, 0, }, { UNCOND32_F, UNCOND32_M, UNCOND32_LENGTH, 0, },
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
}; };
#undef EMPTY
static struct hash_control *opcode_hash_control; /* Opcode mnemonics */ static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
/* /*
@ -828,7 +833,6 @@ get_operands (info, args, operand)
sh_opcode_info *info; sh_opcode_info *info;
char *args; char *args;
sh_operand_info *operand; sh_operand_info *operand;
{ {
char *ptr = args; char *ptr = args;
if (info->arg[0]) if (info->arg[0])
@ -1853,7 +1857,7 @@ md_atof (type, litP, sizeP)
static void static void
s_uses (ignore) s_uses (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
expressionS ex; expressionS ex;
@ -1893,7 +1897,7 @@ size_t md_longopts_size = sizeof(md_longopts);
int int
md_parse_option (c, arg) md_parse_option (c, arg)
int c; int c;
char *arg; char *arg ATTRIBUTE_UNUSED;
{ {
switch (c) switch (c)
{ {
@ -1958,7 +1962,7 @@ struct sh_count_relocs
/*ARGSUSED*/ /*ARGSUSED*/
static void static void
sh_count_relocs (abfd, sec, data) sh_count_relocs (abfd, sec, data)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
segT sec; segT sec;
PTR data; PTR data;
{ {
@ -1988,9 +1992,9 @@ sh_count_relocs (abfd, sec, data)
/*ARGSUSED*/ /*ARGSUSED*/
static void static void
sh_frob_section (abfd, sec, ignore) sh_frob_section (abfd, sec, ignore)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
segT sec; segT sec;
PTR ignore; PTR ignore ATTRIBUTE_UNUSED;
{ {
segment_info_type *seginfo; segment_info_type *seginfo;
fixS *fix; fixS *fix;
@ -2130,7 +2134,7 @@ sh_frob_file ()
void void
md_convert_frag (headers, seg, fragP) md_convert_frag (headers, seg, fragP)
#ifdef BFD_ASSEMBLER #ifdef BFD_ASSEMBLER
bfd *headers; bfd *headers ATTRIBUTE_UNUSED;
#else #else
object_headers *headers; object_headers *headers;
#endif #endif
@ -2860,7 +2864,7 @@ int
sh_do_align (n, fill, len, max) sh_do_align (n, fill, len, max)
int n; int n;
const char *fill; const char *fill;
int len; int len ATTRIBUTE_UNUSED;
int max; int max;
{ {
if (fill == NULL if (fill == NULL
@ -3042,7 +3046,7 @@ sh_coff_reloc_mangle (seg, fix, intr, paddr)
arelent * arelent *
tc_gen_reloc (section, fixp) tc_gen_reloc (section, fixp)
asection *section; asection *section ATTRIBUTE_UNUSED;
fixS *fixp; fixS *fixp;
{ {
arelent *rel; arelent *rel;