From bef2086f5bb1ef350181791c6dff14d0964a5680 Mon Sep 17 00:00:00 2001 From: Stephan Diestelhorst Date: Fri, 7 Mar 2014 15:56:23 -0500 Subject: [PATCH] arm: Fix uninitialised warning with gcc 4.8 Small fix for a warning that prevents compilation with gcc 4.8.1 due to detecting that a variable might be uninitialised. The fix is to assign a safe default. --- src/arch/arm/utility.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/arm/utility.cc b/src/arch/arm/utility.cc index 3d7d9c4fc..d5b062621 100644 --- a/src/arch/arm/utility.cc +++ b/src/arch/arm/utility.cc @@ -704,7 +704,7 @@ bool decodeMrsMsrBankedReg(uint8_t sysM, bool r, bool &isIntReg, int ®Idx, CPSR cpsr, SCR scr, NSACR nsacr, bool checkSecurity) { - OperatingMode mode; + OperatingMode mode = MODE_UNDEFINED; bool ok = true; // R mostly indicates if its a int register or a misc reg, we override -- 2.30.2