linux-mips
[Top] [All Lists]

[PATCH] MIPS: Add an unreachable return statement to satisfy buggy GCCs.

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH] MIPS: Add an unreachable return statement to satisfy buggy GCCs.
From: David Daney <ddaney@caviumnetworks.com>
Date: Wed, 19 Jan 2011 15:24:42 -0800
Cc: David Daney <ddaney@caviumnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
It was reported that GCC-4.3.3 (with CodeSourcery extensions) fails
without this.

Reported-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/mm/tlbex.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 083d341..04f9e17 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -109,6 +109,8 @@ static bool scratchpad_available(void)
 static int scratchpad_offset(int i)
 {
        BUG();
+       /* Really unreachable, but evidently some GCC want this. */
+       return 0;
 }
 #endif
 /*
-- 
1.7.2.3


<Prev in Thread] Current Thread [Next in Thread>