From 456ec016c2403ed95e0b8b33534ab53ed41d7c27 Mon Sep 17 00:00:00 2001
From: David Brownell <dbrownell@users.sourceforge.net>
Date: Mon, 7 Dec 2009 18:14:46 -0800
Subject: ARM: cope with stupidheaded compiler

Some versions of GCC don't understand that if you mask with 0x3
then have cases 0-3, it's not possible for a variable assigned in
all those branches to have no value at end-of-case.  Feh.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
 src/target/arm_disassembler.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/target')

diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c
index e76e3859..407d2904 100644
--- a/src/target/arm_disassembler.c
+++ b/src/target/arm_disassembler.c
@@ -135,7 +135,7 @@ static int evaluate_srs(uint32_t opcode,
 		uint32_t address, struct arm_instruction *instruction)
 {
 	const char *wback = (opcode & (1 << 21)) ? "!" : "";
-	const char *mode;
+	const char *mode = "";
 
 	switch ((opcode >> 23) & 0x3) {
 	case 0:
@@ -143,7 +143,6 @@ static int evaluate_srs(uint32_t opcode,
 		break;
 	case 1:
 		/* "IA" is default */
-		mode = "";
 		break;
 	case 2:
 		mode = "DB";
-- 
cgit v1.2.3