aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-05-29 22:05:27 +0000
committerNick Clifton <nickc@redhat.com>2000-05-29 22:05:27 +0000
commit43841e9116d121fa81a351b66ec9e0821a1b4be8 (patch)
tree29b591ba06ce9cc8ee839f3f60e72a8231b5b2bf /gas
parent5c82d20a26d0b283c831dba782731b4273f4d4d8 (diff)
downloadgdb-43841e9116d121fa81a351b66ec9e0821a1b4be8.zip
gdb-43841e9116d121fa81a351b66ec9e0821a1b4be8.tar.gz
gdb-43841e9116d121fa81a351b66ec9e0821a1b4be8.tar.bz2
Fix compile time warning messages.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-mips.c54
-rw-r--r--gas/config/tc-sh.c46
3 files changed, 58 insertions, 48 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 93084bd..98ac949 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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>
* doc/as.texinfo: Update copyright dates.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 155dfe2..f93e372 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -183,7 +183,7 @@ struct mips_set_options
that we must set the isa and mips16 fields to -1 to indicate that
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.
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
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. */
static int prev_insn_valid;
@@ -756,7 +756,7 @@ static const pseudo_typeS mips_pseudo_table[] =
{"stabn", s_mips_stab, 'n'},
{"text", s_change_sec, 't'},
{"word", s_cons, 2},
- { 0 },
+ { NULL, NULL, 0 },
};
static const pseudo_typeS mips_nonecoff_pseudo_table[] = {
@@ -773,7 +773,7 @@ static const pseudo_typeS mips_nonecoff_pseudo_table[] = {
{"loc", s_ignore, 0},
{"mask", s_mips_mask, 'R'},
{"verstamp", s_ignore, 0},
- { 0 },
+ { NULL, NULL, 0 },
};
extern void pop_insert PARAMS ((const pseudo_typeS *));
@@ -2660,7 +2660,7 @@ macro_build (place, counter, ep, name, fmt, va_alist)
static void
mips16_macro_build (place, counter, ep, name, fmt, args)
char *place;
- int *counter;
+ int *counter ATTRIBUTE_UNUSED;
expressionS *ep;
const char *name;
const char *fmt;
@@ -3443,7 +3443,7 @@ macro (ip)
int tempreg;
int mask;
int icnt = 0;
- int used_at;
+ int used_at = 0;
expressionS expr1;
const char *s;
const char *s2;
@@ -6408,8 +6408,8 @@ macro2 (ip)
macro_build ((char *) NULL, &icnt, NULL, s, "s,t", sreg, AT);
break;
- case M_TRUNCWD:
case M_TRUNCWS:
+ case M_TRUNCWD:
assert (mips_opts.isa == 1);
sreg = (ip->insn_opcode >> 11) & 0x1f; /* floating reg */
dreg = (ip->insn_opcode >> 06) & 0x1f; /* floating reg */
@@ -6997,7 +6997,7 @@ mips_ip (str, ip)
{
char *s;
const char *args;
- char c;
+ char c = 0;
struct mips_opcode *insn;
char *argsStart;
unsigned int regno;
@@ -7083,7 +7083,7 @@ mips_ip (str, ip)
continue;
}
else
- {
+ {
static char buf[100];
sprintf (buf,
_("opcode not supported on this processor: %d (MIPS%d)"),
@@ -9363,7 +9363,7 @@ md_pcrel_from (fixP)
void
cons_fix_new_mips (frag, where, nbytes, exp)
- fragS *frag;
+ fragS *frag ATTRIBUTE_UNUSED;
int where;
unsigned int nbytes;
expressionS *exp;
@@ -9940,7 +9940,7 @@ mips_align (to, fill, label)
static void
s_align (x)
- int x;
+ int x ATTRIBUTE_UNUSED;
{
register int temp;
register long temp_fill;
@@ -10134,7 +10134,7 @@ s_float_cons (type)
static void
s_mips_globl (x)
- int x;
+ int x ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -10175,7 +10175,7 @@ s_mips_globl (x)
static void
s_option (x)
- int x;
+ int x ATTRIBUTE_UNUSED;
{
char *opt;
char c;
@@ -10228,7 +10228,7 @@ static struct mips_option_stack *mips_opts_stack;
static void
s_mipsset (x)
- int x;
+ int x ATTRIBUTE_UNUSED;
{
char *name = input_line_pointer, ch;
@@ -10364,7 +10364,7 @@ s_mipsset (x)
static void
s_abicalls (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
mips_pic = SVR4_PIC;
if (USE_GLOBAL_POINTER_OPT)
@@ -10389,7 +10389,7 @@ s_abicalls (ignore)
static void
s_cpload (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS ex;
int icnt = 0;
@@ -10429,7 +10429,7 @@ s_cpload (ignore)
static void
s_cprestore (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS ex;
int icnt = 0;
@@ -10462,7 +10462,7 @@ s_cprestore (ignore)
static void
s_gpword (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *label;
expressionS ex;
@@ -10502,7 +10502,7 @@ s_gpword (ignore)
static void
s_cpadd (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int icnt = 0;
int reg;
@@ -10536,7 +10536,7 @@ s_cpadd (ignore)
static void
s_insn (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (mips_opts.mips16)
mips16_mark_labels ();
@@ -10565,7 +10565,7 @@ s_mips_stab (type)
static void
s_mips_weakext (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -10975,7 +10975,7 @@ md_estimate_size_before_relax (fragp, segtype)
fragS *fragp;
asection *segtype;
{
- int change;
+ int change = 0;
if (RELAX_MIPS16_P (fragp->fr_subtype))
{
@@ -11083,7 +11083,7 @@ mips_fix_adjustable (fixp)
arelent **
tc_gen_reloc (section, fixp)
- asection *section;
+ asection *section ATTRIBUTE_UNUSED;
fixS *fixp;
{
static arelent *retval[4];
@@ -11324,7 +11324,7 @@ mips_relax_frag (fragp, stretch)
void
md_convert_frag (abfd, asec, fragp)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
segT asec;
fragS *fragp;
{
@@ -11584,7 +11584,7 @@ int
mips_do_align (n, fill, len, max)
int n;
const char *fill;
- int len;
+ int len ATTRIBUTE_UNUSED;
int max;
{
if (fill == NULL
@@ -11676,7 +11676,7 @@ get_number ()
static void
s_file (x)
- int x;
+ int x ATTRIBUTE_UNUSED;
{
int line;
@@ -11689,7 +11689,7 @@ s_file (x)
static void
s_mips_end (x)
- int x;
+ int x ATTRIBUTE_UNUSED;
{
symbolS *p;
int maybe_text;
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index 036a1d3..2138c5a 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -30,6 +30,7 @@
#define DEFINE_TABLE
#include "opcodes/sh-opc.h"
#include <ctype.h>
+#include "struc-symbol.h"
#ifdef OBJ_ELF
#include "elf/sh.h"
@@ -54,7 +55,7 @@ int shl = 0;
static void
little (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
shl = 1;
target_big_endian = 0;
@@ -159,39 +160,43 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define UNCOND32_M -(1<<30)
#define UNCOND32_LENGTH 14
+#define EMPTY { 0, 0, 0, 0 }
+
const relax_typeS md_relax_table[C (END, 0)] = {
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- { 0 },
+ EMPTY,
/* C (COND_JUMP, COND8) */
{ COND8_F, COND8_M, COND8_LENGTH, C (COND_JUMP, COND12) },
/* C (COND_JUMP, COND12) */
{ COND12_F, COND12_M, COND12_LENGTH, C (COND_JUMP, COND32), },
/* C (COND_JUMP, COND32) */
{ COND32_F, COND32_M, COND32_LENGTH, 0, },
- { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ EMPTY, EMPTY, EMPTY, EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- { 0 },
+ EMPTY,
/* C (COND_JUMP_DELAY, COND8) */
{ COND8_F, COND8_M, COND8_LENGTH, C (COND_JUMP_DELAY, COND12) },
/* C (COND_JUMP_DELAY, COND12) */
{ COND12_F, COND12_M, COND12_DELAY_LENGTH, C (COND_JUMP_DELAY, COND32), },
/* C (COND_JUMP_DELAY, COND32) */
{ COND32_F, COND32_M, COND32_LENGTH, 0, },
- { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ EMPTY, EMPTY, EMPTY, EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- { 0 },
+ EMPTY,
/* C (UNCOND_JUMP, UNCOND12) */
{ UNCOND12_F, UNCOND12_M, UNCOND12_LENGTH, C (UNCOND_JUMP, UNCOND32), },
/* C (UNCOND_JUMP, UNCOND32) */
{ UNCOND32_F, UNCOND32_M, UNCOND32_LENGTH, 0, },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
};
+#undef EMPTY
+
static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
/*
@@ -828,7 +833,6 @@ get_operands (info, args, operand)
sh_opcode_info *info;
char *args;
sh_operand_info *operand;
-
{
char *ptr = args;
if (info->arg[0])
@@ -1853,7 +1857,7 @@ md_atof (type, litP, sizeP)
static void
s_uses (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS ex;
@@ -1893,7 +1897,7 @@ size_t md_longopts_size = sizeof(md_longopts);
int
md_parse_option (c, arg)
int c;
- char *arg;
+ char *arg ATTRIBUTE_UNUSED;
{
switch (c)
{
@@ -1958,7 +1962,7 @@ struct sh_count_relocs
/*ARGSUSED*/
static void
sh_count_relocs (abfd, sec, data)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
segT sec;
PTR data;
{
@@ -1988,9 +1992,9 @@ sh_count_relocs (abfd, sec, data)
/*ARGSUSED*/
static void
sh_frob_section (abfd, sec, ignore)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
segT sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo;
fixS *fix;
@@ -2130,7 +2134,7 @@ sh_frob_file ()
void
md_convert_frag (headers, seg, fragP)
#ifdef BFD_ASSEMBLER
- bfd *headers;
+ bfd *headers ATTRIBUTE_UNUSED;
#else
object_headers *headers;
#endif
@@ -2860,7 +2864,7 @@ int
sh_do_align (n, fill, len, max)
int n;
const char *fill;
- int len;
+ int len ATTRIBUTE_UNUSED;
int max;
{
if (fill == NULL
@@ -3042,7 +3046,7 @@ sh_coff_reloc_mangle (seg, fix, intr, paddr)
arelent *
tc_gen_reloc (section, fixp)
- asection *section;
+ asection *section ATTRIBUTE_UNUSED;
fixS *fixp;
{
arelent *rel;