From 8a2d9732e42ad27e2c388bb8459e5a811f462b58 Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Tue, 29 Sep 2015 15:47:29 +0200 Subject: [PATCH] Remove warnings --- gas/config/tc-arc.c | 8 +++++--- gas/config/tc-arc.h | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index 19076fb..d28a60b 100644 --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -2213,7 +2213,9 @@ find_opcode_match (const struct arc_opcode *first_opcode, int got_cpu_match = 0; expressionS bktok[MAX_INSN_ARGS]; int bkntok; + expressionS emptyE; + memset (&emptyE, 0, sizeof (emptyE)); memcpy (bktok, tok, MAX_INSN_ARGS * sizeof (*tok)); bkntok = ntok; @@ -2222,7 +2224,7 @@ find_opcode_match (const struct arc_opcode *first_opcode, const unsigned char *opidx; const unsigned char *flgidx; int tokidx = 0; - const expressionS *t; + const expressionS *t = &emptyE; pr_debug ("%s:%d: find_opcode_match: trying opcode 0x%08X ", frag_now->fr_file, frag_now->fr_line, opcode->opcode); @@ -2573,7 +2575,7 @@ assemble_insn (const struct arc_opcode *opcode, unsigned char pcrel = 0; bfd_boolean needGOTSymbol; bfd_boolean has_delay_slot = FALSE; - extended_bfd_reloc_code_real_type reloc; + extended_bfd_reloc_code_real_type reloc = BFD_RELOC_UNUSED; memset (insn, 0, sizeof (*insn)); image = opcode->opcode; @@ -2996,7 +2998,7 @@ arc_handle_align (fragS* fragP) *dest++ = 0; } /* Writing nop_s. */ - md_number_to_chars (dest, NOP_OPCODE, 2); + md_number_to_chars (dest, NOP_OPCODE_S, 2); } } diff --git a/gas/config/tc-arc.h b/gas/config/tc-arc.h index 8705b8c..dfe8438 100644 --- a/gas/config/tc-arc.h +++ b/gas/config/tc-arc.h @@ -183,7 +183,7 @@ extern void arc_frob_label (symbolS *); /* Registers are generally saved at negative offsets to the CFA. */ #define DWARF2_CIE_DATA_ALIGNMENT (-4) -/* Define the NOPs (the first one is also used by generic code). */ -#define NOP_OPCODE 0x000078E0 -#define NOP_OPCODE_L 0x264A7000 /* mov 0,0. */ +/* Define the NOPs. */ +#define NOP_OPCODE_S 0x000078E0 +#define NOP_OPCODE_L 0x264A7000 /* mov 0,0. */ -- 2.3.8 (Apple Git-58)