Nios II/GAS: Fix build error in `output_movia'

Fix:

cc1: warnings being treated as errors
.../gas/config/tc-nios2.c: In function 'output_movia':
.../gas/config/tc-nios2.c:3474: warning: 'code' may be used uninitialized in this function
make[4]: *** [tc-nios2.o] Error 1

seen with GCC 4.1.2 and 4.4.7.

	gas/
	* config/tc-nios2.c (output_movia): Preset `code' to 0.
This commit is contained in:
Maciej W. Rozycki
2016-01-13 20:58:29 +00:00
parent bc06e0b148
commit 3facb0e9a7
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2016-01-13 Maciej W. Rozycki <macro@imgtec.com>
* config/tc-nios2.c (output_movia): Preset `code' to 0.
2016-01-13 Yoshinori Sato <ysato@users.sourceforge.jp> 2016-01-13 Yoshinori Sato <ysato@users.sourceforge.jp>
* config/tc-h8300.c (get_operand): Remove spurious condition in * config/tc-h8300.c (get_operand): Remove spurious condition in

View File

@ -3471,7 +3471,7 @@ output_movia (nios2_insn_infoS *insn)
and puts it in the current frag. */ and puts it in the current frag. */
char *f = frag_more (8); char *f = frag_more (8);
nios2_insn_relocS *reloc = insn->insn_reloc; nios2_insn_relocS *reloc = insn->insn_reloc;
unsigned long reg, code; unsigned long reg, code = 0;
const struct nios2_opcode *op = insn->insn_nios2_opcode; const struct nios2_opcode *op = insn->insn_nios2_opcode;
/* If the reloc is NULL, there was an error assembling the movia. */ /* If the reloc is NULL, there was an error assembling the movia. */